/* ====================================================================
   Zamaritan — estilos base (comercial moderno)
   Paleta: blanco / azul oscuro #1E3A8A / gris #F8FAFC
   Tipografía: Inter, fallback system
   ==================================================================== */

:root {
    --zm-primary: #1E3A8A;
    --zm-primary-hover: #1E40AF;
    --zm-primary-light: #DBEAFE;
    --zm-accent: #3B82F6;

    --zm-bg: #FFFFFF;
    --zm-bg-soft: #F8FAFC;
    --zm-bg-muted: #F1F5F9;
    --zm-border: #E2E8F0;
    --zm-border-strong: #CBD5E1;

    --zm-text: #0F172A;
    --zm-text-muted: #475569;
    --zm-text-subtle: #94A3B8;

    --zm-success: #16A34A;
    --zm-error: #DC2626;
    --zm-warning: #D97706;

    --zm-radius: 8px;
    --zm-radius-lg: 12px;

    --zm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --zm-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --zm-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);

    --zm-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--zm-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--zm-text);
    background-color: var(--zm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--zm-primary);
    text-decoration: none;
}

a:hover {
    color: var(--zm-primary-hover);
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    color: var(--zm-text);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1em;
    color: var(--zm-text-muted);
}

/* --- Layout --- */

.zm-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.zm-container-narrow {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Nav --- */

.zm-nav {
    background: var(--zm-bg);
    border-bottom: 1px solid var(--zm-border);
    padding: 1rem 0;
}

.zm-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.zm-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--zm-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.zm-brand:hover {
    text-decoration: none;
    color: var(--zm-primary);
}

.zm-brand-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--zm-primary);
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.zm-nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.zm-nav-links a {
    color: var(--zm-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.zm-nav-links a:hover {
    color: var(--zm-text);
    text-decoration: none;
}

/* --- Buttons --- */

.zm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--zm-radius);
    cursor: pointer;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease,
        box-shadow 120ms ease;
    text-decoration: none;
}

.zm-btn-primary {
    background: var(--zm-primary);
    color: #fff;
}

.zm-btn-primary:hover {
    background: var(--zm-primary-hover);
    color: #fff;
    text-decoration: none;
}

.zm-btn-secondary {
    background: var(--zm-bg);
    color: var(--zm-text);
    border-color: var(--zm-border-strong);
}

.zm-btn-secondary:hover {
    background: var(--zm-bg-soft);
    color: var(--zm-text);
    text-decoration: none;
}

.zm-btn-block {
    width: 100%;
}

/* --- Hero --- */

.zm-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(180deg, var(--zm-bg) 0%, var(--zm-bg-soft) 100%);
    text-align: center;
}

.zm-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.zm-hero p {
    font-size: 1.15rem;
    color: var(--zm-text-muted);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.zm-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Features --- */

.zm-section {
    padding: 4rem 0;
}

.zm-section-soft {
    background: var(--zm-bg-soft);
}

.zm-section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.zm-section-title h2 {
    margin-bottom: 0.5rem;
}

.zm-section-title p {
    color: var(--zm-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.zm-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.zm-feature {
    background: var(--zm-bg);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--zm-shadow-sm);
}

.zm-feature h3 {
    margin-bottom: 0.5rem;
    color: var(--zm-text);
}

.zm-feature p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.zm-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--zm-radius);
    background: var(--zm-primary-light);
    color: var(--zm-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* --- Footer --- */

.zm-footer {
    border-top: 1px solid var(--zm-border);
    padding: 2rem 0;
    background: var(--zm-bg);
    color: var(--zm-text-subtle);
    font-size: 0.875rem;
    text-align: center;
}

/* --- Cards (dashboard / app) --- */

.zm-card {
    background: var(--zm-bg);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--zm-shadow-sm);
}

.zm-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--zm-text);
    margin-bottom: 0.75rem;
}

/* --- Auth (login card) --- */

.zm-auth-wrap {
    min-height: calc(100vh - 73px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--zm-bg-soft);
}

.zm-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--zm-bg);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--zm-shadow-lg);
}

.zm-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-align: center;
}

.zm-auth-subtitle {
    color: var(--zm-text-muted);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
}

.zm-form-group {
    margin-bottom: 1.25rem;
}

.zm-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--zm-text);
    margin-bottom: 0.375rem;
}

.zm-form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--zm-text);
    background: var(--zm-bg);
    border: 1px solid var(--zm-border-strong);
    border-radius: var(--zm-radius);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.zm-form-input:focus {
    outline: none;
    border-color: var(--zm-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* --- Flash messages --- */

.zm-flash {
    border-radius: var(--zm-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.zm-flash-error {
    background: #FEF2F2;
    color: var(--zm-error);
    border-color: #FECACA;
}

.zm-flash-info {
    background: var(--zm-primary-light);
    color: var(--zm-primary);
    border-color: #BFDBFE;
}

.zm-flash-success {
    background: #F0FDF4;
    color: var(--zm-success);
    border-color: #BBF7D0;
}

/* --- Dashboard layout --- */

.zm-dash {
    padding: 2.5rem 0;
}

.zm-dash-header {
    margin-bottom: 2rem;
}

.zm-dash-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.zm-dash-header p {
    color: var(--zm-text-muted);
    margin: 0;
}

.zm-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.zm-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--zm-text-muted);
}

.zm-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* --- Utilities --- */

.zm-mt-1 { margin-top: 0.5rem; }
.zm-mt-2 { margin-top: 1rem; }
.zm-mt-3 { margin-top: 1.5rem; }
.zm-mt-4 { margin-top: 2rem; }
.zm-text-muted { color: var(--zm-text-muted); }
.zm-text-center { text-align: center; }
.zm-text-small { font-size: 0.875rem; }

@media (max-width: 640px) {
    .zm-hero {
        padding: 4rem 0 3rem;
    }
    .zm-hero h1 {
        font-size: 2.25rem;
    }
    .zm-nav-links {
        gap: 1rem;
    }
}
