:root {
    --primary: rgb(41 52 69);
    --primary-hover: rgb(41 52 69);
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --background: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 0.75rem;
    --radius-md: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Sidebar Styling */
#accordionSidebar {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--border-color);
    width: 250px !important;
    min-width: 250px !important;
    transition: all 0.2s ease;
}

.sidebar.toggled#accordionSidebar {
    width: 6.5rem !important;
    min-width: 6.5rem !important;
}

.sidebar .sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    overflow: hidden;
}

.sidebar .sidebar-brand .sidebar-brand-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .nav-item .nav-link {
    color: var(--sidebar-text);
    font-weight: 500;
    padding: 0.75rem 1rem 0.75rem 1rem;
    margin: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.sidebar .nav-item .nav-link:hover {
    color: var(--sidebar-active);
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-item.active .nav-link {
    color: var(--sidebar-active);
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-left-color: var(--primary) !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-left: 0;
    padding-left: 1.25rem;
    font-weight: 700;
}

.sidebar .nav-item .nav-link i {
    font-size: 1rem;
    margin-right: 0.75rem;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

/* Topbar Styling */
.topbar {
    height: 4.375rem;
    background-color: var(--card-bg) !important;
    box-shadow: var(--shadow-sm) !important;
    border-bottom: 1px solid var(--border-color);
}

.topbar .nav-item .nav-link {
    height: 4.375rem;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
}

/* Card Styling */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

/* Button Styling */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-1px);
}

.btn-action {
    min-width: 80px;
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.action-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
    align-items: center;
}

/* Table Styling */
.table {
    color: var(--text-main);
}

.table thead th {
    background-color: #f1f5f9;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--text-muted);
    padding: 1rem;
}

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

/* Form Controls */
.form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
}

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

/* Select2 Customization */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    height: auto !important;
    padding: 5px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important;
    color: var(--text-main) !important;
}

/* Utilities */
.text-gray-600 { color: var(--text-muted) !important; }
.small { font-size: 0.875rem; }
.img-profile { width: 32px; height: 32px; }

/* Image Cropper */
.img-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    max-height: 500px;
    background-color: #f7f7f7;
    margin-bottom: 20px;
}

#image-to-crop {
    max-width: 100%;
}
.image-upload-wrapper {
    position: relative;
    width: 100%;
    min-height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    padding: 1rem;
}

.image-upload-wrapper:hover, .image-upload-wrapper.dragover {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.image-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.upload-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.upload-text strong {
    color: var(--primary);
}

.image-preview-container {
    width: 100%;
    height: 100%;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #fff;
    z-index: 5;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}
