@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1e293b;
    --primary-light: #334155;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 260px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* Layout */
#wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

#sidebar .sidebar-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-brand i {
    color: #60a5fa;
    font-size: 1.5rem;
}

#sidebar .nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 1.25rem 1.25rem 0.5rem 1.25rem;
}

#sidebar .nav-link {
    color: #cbd5e1;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.375rem;
    margin: 0.15rem 0.75rem;
    transition: all 0.2s ease;
}

#sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

#sidebar .nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
#main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Top Navbar */
.navbar-top {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f1f5f9;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Content Area */
.content-body {
    padding: 1.75rem;
    flex-grow: 1;
}

/* Metric Cards */
.card-stat {
    border: none;
    border-radius: 12px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    padding: 1.35rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-green { background: #d1fae5; color: #059669; }
.icon-purple { background: #f3e8ff; color: #7c3aed; }
.icon-orange { background: #ffedd5; color: #ea580c; }

/* Custom Tables */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-custom th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    font-size: 0.9rem;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge-status {
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    display: inline-block;
}

.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #feefc3; color: #854d0e; }
.badge-processed { background: #dbeafe; color: #1e40af; }
.badge-locked { background: #e2e8f0; color: #334155; }

/* Buttons */
.btn-primary-custom {
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.55rem 1.25rem;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Auth Cards */
.auth-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
}

.coming-soon-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.coming-soon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
}

/* Responsive Mobile & Tablet Styles */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
}

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

@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-width);
        height: 100vh;
        z-index: 1050;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(-100%);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #main-content {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }

    .content-body {
        padding: 1rem;
    }

    .navbar-top {
        padding: 0.75rem 1rem;
    }

    .card-stat {
        padding: 1rem;
    }
}

