.admin-body { background: var(--bg); }

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-alt), var(--gold-light));
}

.login-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-card .logo { justify-content: center; margin-bottom: 24px; }

.login-card h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.login-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
    padding: 10px;
    background: var(--bg-alt);
    border-radius: 10px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-bottom: 20px;
}

.login-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--plum);
}

.login-card input {
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition);
}

.login-card input:focus { outline: none; border-color: var(--rose); }
.login-card button { margin-top: 8px; width: 100%; justify-content: center; }

.login-error {
    padding: 10px;
    background: #FCE8EA;
    color: #B84A5B;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition);
}

.back-link:hover { color: var(--rose); }

.admin-app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--plum);
    color: rgba(255, 255, 255, 0.85);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 24px;
    color: white;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-logo .logo-icon { color: var(--gold); }
.sidebar-logo em { color: white; font-weight: 400; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    padding: 12px 14px;
    border-radius: 10px;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.nav-item.active {
    background: var(--rose);
    color: white;
}

.nav-icon { font-size: 16px; opacity: 0.9; }

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-link {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 14px;
    border-radius: 10px;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.sidebar-link:hover { color: white; background: rgba(255, 255, 255, 0.05); }

.main {
    padding: 32px 40px;
    max-width: 100%;
    overflow-x: hidden;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.main-header h1 {
    font-size: 32px;
    color: var(--plum);
    margin-bottom: 4px;
}

.main-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.today-badge {
    padding: 8px 16px;
    background: var(--card);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--plum);
    border: 1px solid var(--border);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-card.highlight {
    background: linear-gradient(135deg, var(--plum), var(--rose-dark));
    border-color: transparent;
    color: white;
}

.kpi-card.highlight .kpi-label,
.kpi-card.highlight .kpi-hint { color: rgba(255, 255, 255, 0.8); }

.kpi-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.kpi-value {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    color: var(--plum);
    line-height: 1.1;
    margin: 4px 0;
}

.kpi-card.highlight .kpi-value { color: white; }

.kpi-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--plum);
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 220px;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--rose), var(--rose-dark));
    border-radius: 8px 8px 0 0;
    min-height: 4px;
    position: relative;
    transition: all var(--transition);
    cursor: pointer;
}

.chart-bar:hover .chart-bar-fill {
    background: linear-gradient(180deg, var(--plum), var(--rose-dark));
}

.chart-bar-value {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--plum);
    white-space: nowrap;
}

.chart-bar-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.3;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.upcoming-item {
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
}

.upcoming-item .up-time {
    font-weight: 600;
    color: var(--plum);
    font-size: 13px;
    min-width: 60px;
}

.upcoming-item .up-info { flex: 1; min-width: 0; }
.upcoming-item .up-client { font-size: 13px; font-weight: 500; color: var(--plum); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-item .up-service { font-size: 12px; color: var(--text-muted); }

.top-services, .pros-revenue {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.top-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.top-item-header span { color: var(--plum); font-weight: 500; }
.top-item-header strong { color: var(--rose); font-weight: 600; }

.top-item-bar {
    height: 6px;
    background: var(--bg-alt);
    border-radius: 100px;
    overflow: hidden;
}

.top-item-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rose), var(--gold));
    border-radius: 100px;
    transition: width 0.6s ease;
}

.toolbar {
    margin-bottom: 20px;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters input, .filters select {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
    transition: border-color var(--transition);
}

.filters input { flex: 1; min-width: 220px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--rose); }

.table-wrapper {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--bg-alt);
    color: var(--plum);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

.data-table .cli-name { font-weight: 500; color: var(--plum); }
.data-table .cli-phone { font-size: 12px; color: var(--text-muted); }

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.confirmed { background: #E3F2E9; color: #2E7D5B; }
.status-badge.completed { background: #E8EAF6; color: #4A5FBF; }
.status-badge.cancelled { background: #FCE8EA; color: #B84A5B; }

.row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-alt);
    border: none;
    color: var(--plum);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover { background: var(--rose); color: white; }
.icon-btn.danger:hover { background: #B84A5B; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h3 { color: var(--plum); margin-bottom: 8px; }

.admin-cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.admin-cal-header span {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--plum);
    min-width: 260px;
    text-align: center;
    text-transform: capitalize;
}

.admin-calendar {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.admin-cal-cell {
    background: var(--card);
    padding: 8px;
    min-height: 60px;
    font-size: 12px;
    position: relative;
}

.admin-cal-header-cell {
    background: var(--bg-alt);
    padding: 12px 8px;
    font-weight: 600;
    color: var(--plum);
    text-align: center;
    font-size: 13px;
}

.admin-cal-header-cell.today { background: var(--rose); color: white; }

.admin-cal-time {
    background: var(--bg-alt);
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    padding-right: 12px;
    font-size: 11px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 4px;
}

.appt-block {
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 3px;
    cursor: pointer;
    transition: transform var(--transition);
}

.appt-block:hover { transform: scale(1.02); }
.appt-block strong { display: block; font-weight: 600; }
.appt-block small { opacity: 0.9; font-size: 10px; }
.appt-block.completed { background: linear-gradient(135deg, #4A5FBF, #3B4A9C); }
.appt-block.cancelled { background: linear-gradient(135deg, #999, #777); text-decoration: line-through; opacity: 0.6; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.admin-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-card-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.admin-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-card-icon img { width: 100%; height: 100%; object-fit: cover; }

.admin-card h3 {
    font-size: 18px;
    margin-bottom: 2px;
}

.admin-card-sub {
    color: var(--text-muted);
    font-size: 13px;
}

.admin-card-body p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.admin-card-stats {
    display: flex;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.stat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--plum);
    font-weight: 600;
}

@media (max-width: 900px) {
    .admin-app { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        padding: 12px;
        overflow-x: auto;
    }
    .sidebar-logo { display: none; }
    .sidebar-nav { flex-direction: row; flex: 1; overflow-x: auto; }
    .sidebar-footer {
        flex-direction: row;
        padding-top: 0;
        border: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 12px;
    }
    .nav-item { white-space: nowrap; }
    .main { padding: 20px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .admin-calendar { font-size: 10px; grid-template-columns: 40px repeat(7, 1fr); }
    .table-wrapper { overflow-x: auto; }
}
