:root {
    --sidebar-width: 240px;
    --topbar-height: 60px;
    --bg-page: #f4f6f9;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.admin-body {
    background: var(--bg-page);
    min-height: 100vh;
}

.admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1030;
    gap: 1rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #212529;
}

.topbar-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.topbar-title {
    font-weight: 600;
    font-size: 1rem;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-toggle {
    padding: 0.25rem 0.5rem;
}

.admin-wrapper {
    display: flex;
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: #fff;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 1020;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.admin-sidebar.show {
    transform: translateX(0);
}

@media (min-width: 992px) {
    .admin-sidebar {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #495057;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: #212529;
}

.sidebar-link.active {
    background: #e7f1ff;
    color: #0d6efd;
    border-left-color: #0d6efd;
    font-weight: 500;
}

.sidebar-link.disabled {
    color: #adb5bd;
    pointer-events: none;
}

.admin-main {
    flex: 1;
    padding: 1.5rem;
    margin-left: 0;
    width: 100%;
}

@media (min-width: 992px) {
    .admin-main {
        margin-left: var(--sidebar-width);
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1010;
    display: none;
}

.sidebar-backdrop.show {
    display: block;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    height: 100%;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.login-body {
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

.login-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.table th {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .admin-main {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .topbar-title {
        display: none;
    }
}

.status-icon {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.status-active {
    color: #198754;
}

.status-inactive {
    color: #dc3545;
}

.panel-status-label {
    width: 50%;
}

.panel-check {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: #fff;
}

.panel-check .form-check-input {
    margin-top: 0.2rem;
}

.customer-tabs .nav-link.disabled {
    cursor: not-allowed;
}

.customer-table th,
.customer-table td {
    vertical-align: middle;
}

.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.panel-files-table th,
.panel-files-table td {
    vertical-align: middle;
}

.panel-upload-form input[type="file"] {
    max-width: 220px;
}

.panel-file-card code {
    font-size: 0.85rem;
}
