/* =====================================================================
   TriPing — Sistema de diseño global
   Importar en todas las páginas internas:
   <link rel="stylesheet" th:href="@{/css/styleGlobal.css}">
   ===================================================================== */

/* ── Variables ───────────────────────────────────────────────────────── */
:root {
    /* Colores de marca */
    --c-dark:     #023C40;
    --c-dark-h:   #035358;
    --c-dark-10:  rgba(2,60,64,.10);
    --c-dark-20:  rgba(2,60,64,.20);
    --c-mint:     #78FFD6;
    --c-cyan:     #0AD3FF;
    --c-rose:     #C3979F;

    /* Neutros */
    --c-bg:       #F4F7F9;
    --c-surface:  #FFFFFF;
    --c-border:   #DDE3EA;
    --c-text:     #1A2530;
    --c-muted:    #6B7280;
    --c-light:    #EEF2F6;

    /* Semánticos */
    --c-error:    #DC2626;
    --c-success:  #16A34A;
    --c-warning:  #D97706;
    --c-info:     #0284C7;

    /* Sombras */
    --shadow-xs:  0 1px 3px rgba(0,0,0,.08);
    --shadow-sm:  0 2px 8px rgba(0,0,0,.10);
    --shadow-md:  0 6px 20px rgba(0,0,0,.12);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.16);
    --shadow-xl:  0 20px 60px rgba(0,0,0,.20);

    /* Bordes */
    --rad-s:  6px;
    --rad-m:  12px;
    --rad-l:  20px;
    --rad-xl: 28px;

    /* Tipografía */
    --font: 'Poppins', system-ui, -apple-system, sans-serif;

    /* Transición */
    --t: 0.22s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--c-text); background: var(--c-bg); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-dark);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c-mint);
    flex-shrink: 0;
}

.navbar-brand span { font-size: 1.3rem; }

.navbar-spacer { flex: 1; }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.85);
    font-size: 0.875rem;
    font-weight: 500;
}

.navbar-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-dark-h);
    border: 2px solid var(--c-mint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--c-mint);
    flex-shrink: 0;
}

/* ── Botones ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--rad-m);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--t), transform var(--t), box-shadow var(--t), opacity var(--t);
}
.btn:active { transform: scale(.97); }

.btn-primary {
    background: var(--c-dark);
    color: #fff;
}
.btn-primary:hover {
    background: var(--c-dark-h);
    box-shadow: 0 4px 14px rgba(2,60,64,.35);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--c-cyan), #06b6d4);
    color: #fff;
    box-shadow: 0 4px 14px rgba(10,211,255,.30);
}
.btn-accent:hover {
    box-shadow: 0 6px 18px rgba(10,211,255,.45);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--c-dark);
    border: 2px solid var(--c-border);
}
.btn-outline:hover {
    border-color: var(--c-dark);
    background: var(--c-dark-10);
}

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.75);
    padding: 8px 14px;
}
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); }

.btn-danger { background: var(--c-error); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: var(--rad-s); }
.btn-lg { padding: 14px 28px; font-size: 1rem;   border-radius: var(--rad-l); }
.btn-full { width: 100%; }

.btn-disabled, .btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Botón de logout */
.btn-logout {
    background: none;
    border: 1.5px solid rgba(255,255,255,.30);
    color: rgba(255,255,255,.80);
    padding: 6px 14px;
    border-radius: var(--rad-s);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t);
    font-family: var(--font);
    flex-shrink: 0;
}
.btn-logout:hover { border-color: var(--c-mint); color: var(--c-mint); }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
    background: var(--c-surface);
    border-radius: var(--rad-l);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--t), transform var(--t);
}
.card:hover { box-shadow: var(--shadow-md); }

/* ── Formularios ─────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 6px;
    letter-spacing: .2px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--c-border);
    border-radius: var(--rad-m);
    background: #fafbfc;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--c-text);
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
    outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--c-cyan);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10,211,255,.16);
}
.field input::placeholder { color: #9ca3af; }

/* Input con icono a la izquierda */
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-muted);
    font-size: 1rem;
    pointer-events: none;
}
.input-icon-wrap input { padding-left: 38px; }

/* ── Badges ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.badge-deportiva  { background: #dbeafe; color: #1d4ed8; }
.badge-turistica  { background: #d1fae5; color: #065f46; }
.badge-gastronomica { background: #fef3c7; color: #92400e; }

/* ── Alertas ─────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--rad-m);
    border-left: 4px solid;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 16px;
}
.alert-error   { background: #fef2f2; border-color: var(--c-error);   color: #991b1b; }
.alert-success { background: #f0fdf4; border-color: var(--c-success); color: #166534; }
.alert-info    { background: #eff6ff; border-color: var(--c-info);    color: #1e40af; }
.alert-warn    { background: #fffbeb; border-color: var(--c-warning); color: #92400e; }

/* ── Página vacía ────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-muted);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--c-text); }
.empty-state p  { font-size: 0.875rem; max-width: 320px; margin: 0 auto 20px; }

/* ── Pie de página ───────────────────────────────────────────────────── */
.site-footer {
    background: var(--c-dark);
    color: rgba(255,255,255,.55);
    text-align: center;
    padding: 16px;
    font-size: 0.8rem;
    margin-top: auto;
}
.site-footer strong { color: var(--c-mint); }

/* ── Selector de idioma ──────────────────────────────────────────────── */
.lang-picker { display: flex; align-items: center; gap: 12px; }
.lang-picker a {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    transition: color var(--t);
}
.lang-picker a:hover { color: var(--c-mint); }
.lang-picker span    { color: rgba(255,255,255,.25); }

/* ── Utilidades ──────────────────────────────────────────────────────── */
.text-muted   { color: var(--c-muted); }
.text-success { color: var(--c-success); }
.text-danger  { color: var(--c-error); }
.text-center  { text-align: center; }
.mt-auto      { margin-top: auto; }
.gap-8        { gap: 8px; }
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.hidden       { display: none !important; }

/* ── Coming soon badge ───────────────────────────────────────────────── */
.soon-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: .4px;
    vertical-align: middle;
    margin-left: 6px;
}

/* ── Responsive helpers ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .hide-mobile { display: none !important; }
}
