@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap);
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --sidebar-bg: #1e293b;
    --sidebar-active: #4f46e5;
    --sidebar-hover: #334155;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f1f5f9;
    font-size: 0.875rem;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #0f172a;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 56px;
    display: flex;
    align-items: center;
}

.sidebar-brand h4 {
    color: #fff;
    font-weight: 700;
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.sidebar-brand .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    margin: 0;
}

.sidebar-menu {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-menu-item {
    padding: 9px 16px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
    font-weight: 500;
    border-left: 0;
    border-radius: 0;
    margin: 0;
    min-height: 40px;
    cursor: pointer;
    line-height: 1.3;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    font-size: 13px;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.95);
}

.sidebar-menu-item.active {
    background: rgba(79, 70, 229, 0.25);
    color: #fff;
    font-weight: 600;
}

.sidebar-menu-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4f46e5;
    border-radius: 0 2px 2px 0;
}

.sidebar-menu-item i {
    width: 18px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu-item:hover i {
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-menu-item.active i {
    color: #818cf8;
}

.sidebar-menu-item > span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-submenu {
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 0;
    margin: 0;
    display: none;
}

.sidebar-submenu.show {
    display: block;
}

.sidebar-submenu-item {
    padding: 7px 16px 7px 42px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    transition: all 0.15s ease;
    border-radius: 0;
    min-height: 34px;
    line-height: 1.3;
    position: relative;
}

.sidebar-submenu-item:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 44px;
}

.sidebar-submenu-item.active {
    color: #a5b4fc;
    font-weight: 600;
    background: rgba(79, 70, 229, 0.15);
}

.sidebar-submenu-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #6366f1;
    border-radius: 0 2px 2px 0;
}

.sidebar-submenu-item i {
    width: 14px;
    min-width: 14px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-submenu-item > span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-chevron {
    margin-left: auto;
    font-size: 11px;
    min-width: auto;
    width: auto;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease;
}

.sidebar-chevron.is-open {
    transform: rotate(180deg);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--text-muted);
    padding: 0 0.5rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--light-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.topbar-icon:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.user-dropdown:hover {
    background: var(--light-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background: #fff;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px 0 0 4px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 6px;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.table {
    font-size: 0.875rem;
}

.table thead th {
    background: var(--light-color);
    color: var(--text-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--light-color);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

.invalid-feedback {
    font-size: 0.8rem;
    color: var(--danger-color);
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: var(--danger-color) !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h3 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0.5rem 0 0;
}

.login-logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0.22;
}

.shape-1 { width: 240px; height: 240px; background: #3b82f6; top: -80px; left: 8%; }
.shape-2 { width: 300px; height: 300px; background: #06b6d4; top: 22%; right: -100px; }
.shape-3 { width: 220px; height: 220px; background: #f97316; bottom: 8%; left: -80px; }
.shape-4 { width: 180px; height: 180px; background: #2563eb; bottom: -50px; right: 18%; }
.shape-5 { width: 140px; height: 140px; background: #22d3ee; top: 60%; left: 45%; }
.shape-6 { width: 200px; height: 200px; background: #0ea5e9; top: 5%; left: 42%; }

.login-container {
    position: relative;
    z-index: 2;
    width: min(1120px, 95vw);
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    backdrop-filter: blur(14px);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
    padding: 2rem;
}

.login-left,
.login-right {
    color: #e2e8f0;
}

.login-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-branding h1 {
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
}

.login-branding p {
    color: #cbd5e1;
    margin-bottom: 1.2rem;
}

.login-logo-img {
    display: block;
    width: min(360px, 100%);
    max-height: 110px;
    -o-object-fit: contain;
       object-fit: contain;
}

.login-features {
    display: grid;
    gap: 0.85rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-weight: 500;
}

.feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7dd3fc;
}

.login-header h2 {
    color: #ffffff;
    font-size: 1.9rem;
    margin-bottom: 0.2rem;
}

.login-header p {
    color: #cbd5e1;
    margin-bottom: 1.4rem;
}

.login-wrapper .form-label,
.login-wrapper .form-check-label,
.login-wrapper .small,
.login-wrapper .security-status,
.login-wrapper .trust-item {
    color: #e2e8f0 !important;
}

.login-wrapper .input-group-text {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.login-wrapper .form-control {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
}

.btn-signin {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-signin:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.security-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.9rem;
    color: #dbeafe;
}

.security-badge-inner {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.security-dots {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.78rem;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
    color: #cbd5e1;
    font-size: 0.82rem;
}

@media (max-width: 992px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        padding: 1.4rem;
    }

    .login-left {
        gap: 1rem;
    }

    .login-branding h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .login-page {
        align-items: flex-start;
        padding: 1rem 0;
    }

    .login-container {
        width: 94vw;
    }

    .login-wrapper {
        gap: 1rem;
        padding: 1rem;
        border-radius: 14px;
    }

    .login-left {
        margin-bottom: 0.25rem;
    }

    .login-features {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .feature-item {
        font-size: 0.92rem;
    }

    .login-header h2 {
        font-size: 1.55rem;
    }

    .security-badge {
        padding: 0.6rem 0.65rem;
    }

    .security-badge-inner,
    .security-dots {
        font-size: 0.74rem;
    }

    .trust-row {
        gap: 0.45rem 0.7rem;
    }

    .trust-item {
        font-size: 0.72rem;
    }

    .login-footer {
        font-size: 0.72rem;
        padding: 0 0.5rem;
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    .login-container {
        width: 96vw;
    }

    .login-wrapper {
        padding: 1rem;
        border-radius: 16px;
    }

    .login-logo-img {
        max-height: 84px;
    }

    .login-left {
        display: none;
    }

    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-header h2 {
        font-size: 1.35rem;
    }
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--light-color);
    color: var(--text-dark);
}

.dropdown-item i {
    margin-right: 0.5rem;
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.bg-primary-subtle {
    background: rgba(79, 70, 229, 0.1);
}

.bg-success-subtle {
    background: rgba(16, 185, 129, 0.1);
}

.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.1);
}

.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.1);
}

.bg-info-subtle {
    background: rgba(14, 165, 233, 0.1);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}
