/* ===== PAINEL ADMIN ===== */
.admin-panel {
    position: fixed;
    top: 0; right: -100%;
    width: 96%;
    max-width: 1380px;
    height: 100vh;
    background: var(--admin-bg);
    z-index: 1000;
    padding: 0;
    overflow: hidden;
    transition: right 0.65s var(--smooth-slow);
    box-shadow: -6px 0 60px rgba(0,0,0,0.16);
    display: flex;
    flex-direction: column;
}

.admin-panel.active { right: 0; }

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem 0 1.25rem;
    height: 58px;
    background: #232323;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    gap: 1rem;
}

.admin-topbar-left { display: flex; align-items: center; gap: 0.9rem; flex: 1; min-width: 0; }

.admin-topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.admin-topbar-brand {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    flex-shrink: 0;
}

.admin-topbar-sep-icon {
    width: 13px;
    height: 13px;
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.admin-topbar-user {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: rgba(184,151,90,0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-brand { display: none; }
.admin-brand-sep { display: none; }

.admin-topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.admin-topbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    margin: 0 0.15rem;
}

.admin-menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.admin-menu-toggle svg { width: 18px; height: 18px; }
.admin-menu-toggle:hover { background: rgba(255,255,255,0.07); color: #fff; }

.btn-fechar {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.55);
    border: none;
    width: 34px; height: 34px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, transform 0.3s var(--smooth-bounce);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.btn-fechar svg { width: 16px; height: 16px; }
.btn-fechar:hover { background: rgba(192,57,43,0.18); color: #e05c4b; transform: rotate(90deg); }

.btn-limpar-topbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.35rem 0.85rem;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    border-radius: 8px;
    text-transform: uppercase;
    font-family: inherit;
    white-space: nowrap;
}

.btn-limpar-topbar svg { width: 13px; height: 13px; flex-shrink: 0; }
.btn-limpar-topbar:hover { background: rgba(192,57,43,0.15); color: #e05c4b; border-color: rgba(192,57,43,0.4); }

.admin-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    background: #1f1f1f;
}

.admin-sidebar {
    width: 230px;
    min-width: 230px;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(180deg, #1a1a1a 0%, #222 100%);
    border-right: 1px solid rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    padding: 0 0 1.5rem;
    overflow-y: auto;
}

.admin-sidebar-brand {
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.6rem 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 0.5rem;
}

.admin-sidebar-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    line-height: 1;
}

.admin-sidebar-brand-sub {
    font-size: 0.6rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(184,151,90,0.75);
    margin-top: 0.35rem;
    font-weight: 500;
}

.admin-nav-group {
    display: flex;
    flex-direction: column;
    padding: 0 0.85rem;
    margin-bottom: 0.25rem;
}

.admin-nav-label {
    font-size: 0.58rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
    padding: 1rem 0.7rem 0.4rem;
    font-weight: 600;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
    transition: color 0.2s, background 0.2s;
    position: relative;
    font-family: inherit;
    border-radius: 8px;
}

.admin-nav-item .nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.admin-nav-item .nav-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.admin-nav-item:hover {
    color: rgba(255,255,255,0.88);
    background: rgba(255,255,255,0.05);
}

.admin-nav-item:hover .nav-icon { opacity: 1; }

.admin-nav-item.active {
    color: #fff;
    font-weight: 600;
    background: rgba(184,151,90,0.14);
}

.admin-nav-item.active .nav-icon { opacity: 1; color: #b8975a; }

.admin-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 22%; bottom: 22%;
    width: 2.5px;
    background: linear-gradient(180deg, #d4aa50, #b8975a);
    border-radius: 0 3px 3px 0;
}

.admin-sidebar-spacer { flex: 1; }

.admin-main {
    flex: 1;
    position: relative;
    overflow-y: auto;
    padding: 30px;
    background: #e9ebee;
    border-top-left-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.admin-main::-webkit-scrollbar { width: 5px; }
.admin-main::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.05rem;
    margin-bottom: 2.1rem;
}

.stat-card {
    background:
        radial-gradient(140% 120% at 100% 0%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.74) 44%, rgba(255,255,255,0.6) 100%),
        linear-gradient(150deg, #ffffff 0%, #f7f8fa 100%);
    padding: 1.45rem 1.4rem 1.25rem;
    text-align: left;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08), 0 2px 7px rgba(15, 23, 42, 0.05);
    transition: transform 0.28s var(--smooth-bounce), box-shadow 0.28s, border-color 0.28s;
    position: relative;
    overflow: hidden;
    cursor: default;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -28px;
    right: -26px;
    width: 94px;
    height: 94px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(184,151,90,0.22) 0%, rgba(184,151,90,0) 72%);
    pointer-events: none;
}

.stat-card::after {
    content: '';
    position: absolute;
    left: 1.15rem;
    right: 1.15rem;
    bottom: 0.85rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(184,151,90,0.9), rgba(22,103,58,0.55));
    opacity: 0.86;
}

.stat-card:nth-child(1)::after { background: linear-gradient(90deg, #364152, #1f2937); }
.stat-card:nth-child(2)::after { background: linear-gradient(90deg, #17673a, #2f855a); }
.stat-card:nth-child(3)::after { background: linear-gradient(90deg, #b8975a, #d4aa50); }
.stat-card:nth-child(4)::after { background: linear-gradient(90deg, #0f4c81, #0b63a5); }

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(184,151,90,0.35);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12), 0 4px 11px rgba(15, 23, 42, 0.06);
}

.stat-number {
    font-size: clamp(1.7rem, 2.2vw, 2.2rem);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.42rem;
    line-height: 1;
    letter-spacing: 0.2px;
}

.stat-label {
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 2.1px;
    color: rgba(51, 65, 85, 0.78);
    font-weight: 700;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp 0.35s var(--smooth) forwards; }

.admin-appointments {
    background: var(--admin-white);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.appointment-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }

.filter-btn {
    padding: 0.4rem 1.1rem;
    background: transparent;
    border: 1px solid var(--admin-border);
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: inherit;
}

.filter-btn:hover, .filter-btn.active { background: var(--admin-ink); color: #fff; border-color: var(--admin-ink); }

.btn-admin-create {
    padding: 0.45rem 1.2rem;
    background: var(--admin-ink);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: inherit;
    transition: background 0.25s, transform 0.25s var(--smooth-bounce);
}

.btn-admin-create:hover { background: var(--cinza-escuro); transform: translateY(-2px); }

.clientes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.35rem;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(20, 83, 45, 0.94)),
        linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 18px 38px rgba(10, 30, 18, 0.16);
}

.clientes-title {
    margin: 0;
    font-weight: 300;
    letter-spacing: 3px;
}

.clientes-subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.76);
    max-width: 560px;
}

.clientes-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-export-excel {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 1.1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    background: linear-gradient(180deg, #2fbf71 0%, #1d7f47 100%);
    color: #fff;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    box-shadow: 0 12px 24px rgba(23, 103, 58, 0.32);
    transition: transform 0.2s var(--smooth-bounce), box-shadow 0.2s, filter 0.2s, opacity 0.2s;
    font-family: inherit;
}

.btn-export-excel:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(23, 103, 58, 0.38);
    filter: saturate(1.08);
}

.btn-export-excel:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.excel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 0.86rem;
    font-weight: 800;
}

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

.cliente-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.95rem;
    padding: 1.1rem 1.15rem;
    background: var(--admin-white);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.cliente-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111827, #2f855a);
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

.cliente-info strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--admin-ink);
}

.cliente-info p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 0.85rem;
}

.cliente-info small {
    display: inline-block;
    margin-top: 0.4rem;
    color: var(--admin-muted);
    font-size: 0.76rem;
}

.cliente-meta-pill {
    align-self: start;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: rgba(47, 191, 113, 0.1);
    color: #17673a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.cliente-desc-badge {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(212,170,80,0.18), rgba(212,170,80,0.08));
    color: #b8860b;
    border: 1px solid rgba(212,170,80,0.35);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cliente-fidelidade-selos {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(100,116,139,0.08);
    color: var(--admin-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cliente-meta-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    align-self: start;
}

.cliente-bonus-btn {
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(212,170,80,0.45);
    background: rgba(212,170,80,0.09);
    color: #a07720;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    white-space: nowrap;
}

.cliente-bonus-btn:hover {
    background: #d4aa50;
    color: #fff;
    border-color: #d4aa50;
}

.cliente-bonus-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Admin header (compat) */
.admin-header { display: none; }
.admin-body   { display: none; }
.admin-tabs   { display: none; }

/* Admin Tooltip */
.admin-tooltip {
    position: fixed;
    background: var(--admin-white);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    width: 280px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 9999;
}

.admin-tooltip-close {
    position: absolute;
    top: 0.7rem; right: 0.7rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--admin-muted);
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.admin-tooltip-close:hover { background: rgba(0,0,0,0.06); }
.admin-tooltip-name { font-size: 0.9rem; font-weight: 700; color: var(--admin-ink); margin-bottom: 0.6rem; }
.admin-tooltip-info { font-size: 0.8rem; color: var(--admin-muted); margin-bottom: 0.4rem; }
.admin-tooltip-time { font-size: 0.9rem; font-weight: 600; color: var(--admin-ink); margin-bottom: 1rem; }

.admin-warning-badge {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #a15c00;
    vertical-align: middle;
}

.admin-warning-badge-inline {
    display: inline-block;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #a15c00;
}

.admin-tooltip-action {
    background: var(--admin-danger);
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    width: 100%;
    transition: background 0.2s;
    font-weight: 600;
}

.admin-tooltip-action:hover { background: #a03020; }

/* Admin Modal */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.admin-modal-overlay.active {
    display: flex;
}

.admin-modal {
    background: var(--admin-white);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.admin-modal h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--admin-ink);
}

.admin-modal input,
.admin-modal select,
.admin-modal textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.admin-modal input:focus,
.admin-modal select:focus,
.admin-modal textarea:focus {
    outline: none;
    border-color: var(--admin-gold);
    box-shadow: 0 0 0 3px var(--admin-gold-lt);
}

.admin-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--admin-border);
}

.admin-modal-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    font-family: inherit;
}

.admin-modal-btn-primary {
    background: var(--admin-ink);
    color: #fff;
}

.admin-modal-btn-primary:hover {
    background: var(--cinza-escuro);
}

.admin-modal-btn-secondary {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-ink);
}

.admin-modal-btn-secondary:hover {
    background: rgba(0,0,0,0.03);
}

/* Admin Login Modal */
.admin-login-modal {
    background: var(--branco);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.admin-login-modal h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-login-modal input {
    width: 100%;
    padding: 0.85rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.admin-login-modal input:focus {
    outline: none;
    border-color: var(--preto);
}

.admin-login-modal button {
    width: 100%;
    padding: 0.9rem;
    background: var(--preto);
    color: var(--branco);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.admin-login-modal button:hover {
    background: var(--cinza);
}

/* Admin History List */
.admin-history-shell {
    display: grid;
    gap: 1rem;
}

.admin-history-stats {
    margin-bottom: 0;
}

.admin-history-stat-card {
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(212,170,80,0.14) 0%, rgba(212,170,80,0) 58%),
        linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.admin-history-stat-number {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--admin-ink);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.admin-history-stat-label {
    font-size: 0.68rem;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 700;
}

.admin-history-filters {
    justify-content: center;
    margin-bottom: 0;
}

.admin-history-empty {
    text-align: center;
    padding: 2.6rem 1.2rem;
    background: var(--admin-white);
    border-radius: 16px;
    border: 1px dashed rgba(15, 23, 42, 0.2);
}

.admin-history-empty-icon {
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
    opacity: 0.35;
}

.admin-history-empty p {
    color: var(--admin-muted);
}

.admin-history-list {
    background: linear-gradient(165deg, #2a2f36 0%, #23272e 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 0;
    padding: 0.5rem 0.78rem 0.78rem;
}

.admin-history-list-head {
    display: grid;
    grid-template-columns: 1.35fr 1.25fr auto;
    gap: 0.3rem;
    align-items: center;
    padding: 0.48rem 0.64rem 0.34rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 0.05rem;
}

.admin-history-list-head span {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: rgba(226, 232, 240, 0.75);
}

.admin-history-list-head span:last-child {
    justify-self: end;
}

.admin-history-item {
    padding: 0.76rem 0.76rem;
    border: 1px solid transparent;
    display: grid;
    grid-template-columns: 1.35fr 1.25fr auto;
    gap: 0.72rem;
    align-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: none;
    transition: transform 0.2s var(--smooth-bounce), background 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.admin-history-item:last-child {
    border-bottom: 1px solid transparent;
}

.admin-history-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.14);
}

.admin-history-item::after {
    content: '';
    position: absolute;
    left: 0.76rem;
    right: 0.76rem;
    bottom: 0;
    height: 1px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.12);
    opacity: 1;
}

.admin-history-item:last-child::after {
    display: none;
}

.admin-history-item-concluido {
    border-left: 4px solid rgba(39, 174, 96, 0.9);
}

.admin-history-item-cancelado {
    border-left: 4px solid rgba(192, 57, 43, 0.92);
}

.admin-history-info {
    flex: 1;
}

.admin-history-col-client,
.admin-history-col-service {
    min-width: 0;
}

.admin-history-client {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.25rem;
}

.admin-history-client-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #111827, #17673a);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.admin-history-client-main {
    min-width: 0;
}

.admin-history-name {
    font-weight: 700;
    color: rgba(248, 250, 252, 0.95);
    margin-bottom: 0.14rem;
    font-size: 0.85rem;
}

.admin-history-details {
    font-size: 0.74rem;
    color: rgba(203, 213, 225, 0.78);
    margin-bottom: 0.2rem;
}

.admin-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding-right: 0.15rem;
}

.admin-history-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.2rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    font-size: 0.61rem;
    font-weight: 600;
    letter-spacing: 0.25px;
    color: rgba(241, 245, 249, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-history-chip.service {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.34);
    color: #bae6fd;
}

.admin-history-chip.price {
    background: rgba(74, 222, 128, 0.14);
    border-color: rgba(74, 222, 128, 0.34);
    color: #bbf7d0;
    font-weight: 700;
}

.admin-history-actions {
    display: flex;
    gap: 0.36rem;
    align-items: center;
    align-self: flex-start;
    justify-self: end;
}

.admin-history-status {
    padding: 0.24rem 0.72rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.admin-history-delete {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.92rem;
    padding: 0.16rem;
    border-radius: 7px;
    transition: background 0.2s, transform 0.2s;
}

.admin-history-delete:hover {
    background: rgba(220,53,69,0.12);
    transform: scale(1.08);
}

.admin-history-status.concluido {
    background: rgba(39,174,96,0.15);
    color: #27AE60;
}

.admin-history-status.cancelado {
    background: rgba(192,57,43,0.15);
    color: #C0392B;
}

/* Barber Cards in Admin */
.admin-barber-card {
    background: var(--admin-white);
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid var(--admin-border);
    margin-bottom: 1rem;
}

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

.admin-barber-card.premium {
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(212,170,80,0.15) 0%, rgba(212,170,80,0) 55%),
        linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09), 0 3px 8px rgba(15, 23, 42, 0.05);
    padding: 1.2rem;
    margin: 0;
    transition: transform 0.28s var(--smooth-bounce), box-shadow 0.28s, border-color 0.28s;
    position: relative;
    overflow: hidden;
}

.admin-barber-card.premium:hover {
    transform: translateY(-4px);
    border-color: rgba(184,151,90,0.3);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.14), 0 6px 14px rgba(15, 23, 42, 0.07);
}

.admin-barber-card.premium::after {
    content: '';
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 0.7rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #17673a, #d4aa50 52%, #0f4c81);
    opacity: 0.88;
}

.admin-barber-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.admin-barber-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(140deg, #0f172a, #17673a);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.admin-barber-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-ink);
    margin: 0;
    letter-spacing: 0.3px;
}

.admin-barber-role {
    margin: 0.2rem 0 0;
    font-size: 0.65rem;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.78);
    font-weight: 600;
}

.admin-barber-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.95rem;
}

.admin-barber-stat {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.72rem;
    border-radius: 12px;
    text-align: left;
}

.admin-barber-stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--admin-ink);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.admin-barber-stat-label {
    display: block;
    font-size: 0.58rem;
    color: rgba(71, 85, 105, 0.86);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-weight: 700;
}

.admin-barber-upcoming {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 0.72rem 0.78rem;
}

.admin-barber-upcoming-title {
    margin: 0 0 0.55rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: rgba(71, 85, 105, 0.8);
    font-weight: 700;
}

.admin-barber-upcoming-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.admin-barber-upcoming-list li {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.72rem;
    color: var(--admin-ink);
    background: rgba(15, 23, 42, 0.03);
    border-radius: 8px;
    padding: 0.38rem 0.45rem;
}

.admin-barber-upcoming-list .slot-date {
    color: rgba(51, 65, 85, 0.95);
    font-weight: 600;
}

.admin-barber-upcoming-list .slot-time {
    color: #17673a;
    font-weight: 700;
}

.admin-barber-upcoming-list .slot-client {
    color: rgba(15, 23, 42, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-barber-empty {
    margin: 0;
    font-size: 0.77rem;
    color: var(--admin-muted);
}

/* Time-off Section */
.admin-folga-container {
    background: var(--admin-white);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-folga-container.premium {
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(212,170,80,0.16) 0%, rgba(212,170,80,0) 52%),
        linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1), 0 4px 10px rgba(15, 23, 42, 0.06);
}

.admin-folga-title {
    margin: 0 0 1rem;
    font-size: 0.66rem;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: rgba(51, 65, 85, 0.84);
    font-weight: 700;
}

.admin-folga-form {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.admin-folga-input {
    padding: 0.5rem 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--admin-ink);
    transition: border-color 0.22s, box-shadow 0.22s;
}

.admin-folga-input:focus {
    outline: none;
    border-color: rgba(184,151,90,0.65);
    box-shadow: 0 0 0 3px rgba(184,151,90,0.16);
}

.btn-admin-create.folga {
    border-radius: 12px;
    padding: 0.55rem 1rem;
    background: linear-gradient(140deg, #111827, #17673a);
}

.admin-folga-list {
    display: grid;
    gap: 1rem;
}

.admin-folga-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
}

.admin-folga-item.premium {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    position: relative;
    overflow: hidden;
}

.admin-folga-item.premium::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.5rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(23,103,58,0.9), rgba(212,170,80,0.85));
}

.admin-folga-info {
    flex: 1;
}

.admin-folga-barber {
    font-weight: 700;
    color: var(--admin-ink);
    margin: 0;
    letter-spacing: 0.25px;
}

.admin-folga-dates {
    font-size: 0.78rem;
    color: rgba(71, 85, 105, 0.88);
    margin: 0.25rem 0 0;
}

.admin-folga-delete {
    background: rgba(192,57,43,0.08);
    border: 1px solid rgba(192,57,43,0.25);
    color: #b4382b;
    padding: 0.42rem 0.82rem;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.22s;
}

.admin-folga-delete:hover {
    background: var(--admin-danger);
    color: #fff;
}

.admin-folga-empty {
    text-align: center;
    padding: 1.2rem;
    color: var(--admin-muted);
    background: rgba(15, 23, 42, 0.03);
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 12px;
    margin: 0;
}

/* Dashboard Title */
.admin-section-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--admin-border);
    color: var(--admin-ink);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Responsive Admin Sidebar */
@media (max-width: 1024px) {
    .admin-panel {
        width: 100%;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-main {
        padding: 20px;
    }

    .clientes-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .clientes-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-history-list-head {
        display: none;
    }

    .admin-history-item {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .admin-history-actions {
        justify-content: flex-start;
    }

    .admin-folga-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-folga-input,
    .btn-admin-create.folga {
        width: 100%;
    }

    .admin-folga-item {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .admin-barbers-grid {
        grid-template-columns: 1fr;
    }

    .admin-barber-upcoming-list li {
        grid-template-columns: 1fr;
        gap: 0.22rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }

    .cliente-card {
        grid-template-columns: auto 1fr;
    }

    .cliente-meta-group {
        grid-column: 1 / -1;
        align-items: flex-start;
    }

    .btn-export-excel,
    .btn-admin-create {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ADMIN BOTTOM NAV MOBILE ===== */
.admin-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Mostrar bottom nav SÓ quando o painel admin está ativo */
    .admin-panel.active .admin-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: #111;
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 600;
        align-items: stretch;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    }

    /* Espaço no fundo do main para não ficar tapado */
    .admin-main {
        padding-bottom: 80px !important;
    }

    /* Esconder sidebar no mobile — navegação é pela bottom nav */
    .admin-sidebar {
        display: none !important;
    }

    /* Esconder o botão hambúrguer da topbar — não precisa mais */
    .admin-menu-toggle {
        display: none !important;
    }

    .admin-bottom-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: transparent;
        border: none;
        color: rgba(255,255,255,0.4);
        cursor: pointer;
        transition: color 0.2s ease;
        padding: 8px 4px;
        -webkit-tap-highlight-color: transparent;
    }

    .admin-bottom-btn svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    .admin-bottom-btn span {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        font-weight: 500;
    }

    .admin-bottom-btn.active {
        color: #B8975A;
    }

    .admin-bottom-btn:active {
        transform: scale(0.92);
    }
}

/* ===== AGENDA DAY VIEW — MOBILE FIX ===== */
@media (max-width: 768px) {
    /* Nome completo no breadcrumb — sem cortar */
    .admin-topbar-user {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.68rem;
        max-width: 120px;
    }

    /* Agenda diária — scroll horizontal com colunas mínimas */
    .agenda-day-view {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .agenda-day-header,
    .agenda-day-body {
        grid-template-columns: 48px minmax(100px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr) !important;
        min-width: 380px;
    }

    .agenda-day-header-cell {
        font-size: 0.65rem;
        padding: 0.6rem 0.3rem;
        letter-spacing: 0.5px;
    }

    .agenda-hour-label {
        font-size: 0.62rem;
        padding: 0.3rem 0.2rem;
    }

    .agenda-day-slot {
        font-size: 0.62rem;
        padding: 0.2rem 0.3rem;
        gap: 0.2rem;
    }
}

/* ===== AGENDA SEMANAL MOBILE — scroll horizontal ===== */
@media (max-width: 768px) {
    .agenda-grid-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }

    .agenda-grid {
        min-width: 700px !important;
    }

    .agenda-cabecalho {
        font-size: 0.65rem !important;
        padding: 0.6rem 0.3rem !important;
        letter-spacing: 0.5px !important;
    }

    .agenda-recurso {
        font-size: 0.72rem !important;
        padding: 0.6rem 0.4rem !important;
    }

    .agenda-celula {
        min-height: 56px !important;
        padding: 0.3rem !important;
    }
}
