:root {
    --primary: #3b82f6;
    --primary-rgb: 59, 130, 246;
    --primary-hover: #2563eb;
    --secondary: #10b981;
    --secondary-hover: #059669;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --accent: #f59e0b;
    --danger: #ef4444;

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);

    --shadow: 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);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Century Gothic', CenturyGothic, sans-serif;
}

body {
    background: linear-gradient(135deg, #e0e7ff 0%, #f1f5f9 100%);
    color: var(--dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #000000;
    color: white;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    color: var(--light);
    letter-spacing: 1px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary);
}

/* Main Content */
.content {
    flex: 1;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100vh;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

/* Glassmorphism Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

/* Typography & Utilities */
h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--gray);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--gray);
}

.text-bold {
    font-weight: 700;
}

.text-accent {
    color: var(--accent);
}

.hidden {
    display: none !important;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.relative {
    position: relative;
}

.full-width {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--dark);
    color: white;
}

.btn-secondary:hover {
    background: #0f172a;
}

.btn-success {
    background: var(--secondary);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-hover);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
}

.btn-danger:hover {
    background: #fee2e2;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.row {
    display: flex;
    gap: 1rem;
}

.half {
    flex: 1;
}

.input-search {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 1rem center;
    padding-left: 2.75rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f1f5f9;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 0.5rem;
    border: 1px solid var(--light-gray);
    box-shadow: var(--shadow-lg);
}

.search-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    transition: background 0.2s;
}

.search-item:hover {
    background: #f1f5f9;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item-group {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.search-item-desc {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0.25rem 0;
}

.search-item-price {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Layout Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.full-width-layout {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Notifications */
#notification-area {
    padding: 1rem;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-weight: 500;
    animation: fadein 0.3s;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--gray);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--light-gray);
}

.divider span {
    padding: 0 1rem;
}

/* Grouped Accordion */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.accordion-group {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.accordion-header {
    padding: 0.2rem 1rem;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gray);
    transition: transform 0.3s;
}

.accordion-group.expanded .accordion-header::after {
    content: '-';
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    border-top: 1px solid var(--light-gray);
}

.accordion-group.expanded .accordion-content {
    display: block;
}