/* ============================================
   SMM Panel - Modern Beautiful Design
   ============================================ */

   :root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #111827;
    --text-muted: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   Header
   ============================================ */

.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    order: 2;
    flex-shrink: 0;
}

.logo i {
    font-size: 28px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: var(--shadow);
    order: 3;
    flex-shrink: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.user-info i {
    font-size: 24px;
    color: var(--primary-color);
}

.logout-btn {
    padding: 10px 20px;
    background: var(--danger-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 90px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.sidebar-menu a i {
    font-size: 18px;
    width: 24px;
}

.sidebar-menu a.logout-link {
    color: var(--danger-color);
}

.sidebar-menu a.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.main-content {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    min-height: calc(100vh - 120px);
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    gap: 20px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    margin: 0;
    min-width: 0;
    word-wrap: break-word;
}

.page-header h1 i {
    color: var(--primary-color);
}

.page-header .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 20px 25px;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* ============================================
   Statistics Cards
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    flex-shrink: 0;
}

.stat-primary .stat-icon {
    background: var(--gradient-primary);
}

.stat-success .stat-icon {
    background: var(--gradient-success);
}

.stat-warning .stat-icon {
    background: var(--gradient-warning);
}

.stat-info .stat-icon {
    background: var(--gradient-info);
}

.stat-content h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}
/* ============================================
   Forms
   ============================================ */

   .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--light-color);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* ============================================
   Filters
   ============================================ */

.filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: var(--primary-color);
    font-size: 14px;
}

.filter-group select.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    background-color: white;
    color: var(--text-color);
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    box-sizing: border-box;
}

.filter-group select.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-group select.form-control:disabled {
    background-color: var(--light-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.filter-group small {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.filter-group small i {
    font-size: 11px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* ============================================
   Tables
   ============================================ */

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: var(--light-color);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table tbody tr {
    transition: all 0.2s ease;
}

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

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

.text-center {
    text-align: center;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Status Badges
   ============================================ */

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-processing,
.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-partial {
    background: #fde68a;
    color: #78350f;
}

.status-canceled {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   Service Cards
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.service-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-header {
    padding: 20px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.service-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.service-body {
    padding: 20px;
}

.service-info {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 14px;
}

.info-item i {
    color: var(--primary-color);
    width: 20px;
}

/* ============================================
   Modals
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-color);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0;
}

.close {
    color: var(--text-muted);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: var(--light-color);
    border-radius: 0 0 20px 20px;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    min-width: 300px;
    max-width: 500px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    margin-left: 15px;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   Loading Overlay
   ============================================ */

.loading-overlay {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 20px;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sidebar-menu li {
        margin: 0;
    }
    
    .sidebar-menu a {
        padding: 10px 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        gap: 15px;
        padding: 15px 20px;
        justify-content: space-between;
    }
    
    .balance-display {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filters-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .table-responsive {
        overflow-x: scroll;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .alert {
        min-width: auto;
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
}

/* ============================================
   Utilities
   ============================================ */

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

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

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

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

.text-info {
    color: var(--info-color);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 30px;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

.mt-3 {
    margin-top: 30px;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 10px;
}

.p-2 {
    padding: 20px;
}

.p-3 {
    padding: 30px;
}

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   Animations
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .header,
    .sidebar,
    .btn,
    .page-header button {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .main-content {
        box-shadow: none;
        border-radius: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --text-color: #f9fafb;
        --text-muted: #9ca3af;
        --light-color: #1f2937;
        --border-color: #374151;
        --dark-color: #111827;
    }
    
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .card,
    .main-content,
    .sidebar,
    .header {
        background: #1f2937;
        color: var(--text-color);
    }
    */
}

/* ============================================
   Accessibility
   ============================================ */

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   Custom Select Styling
   ============================================ */

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* ============================================
   Link Styling
   ============================================ */

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Small Text
   ============================================ */

small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-state p {
    font-size: 14px;
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    order: 1;
}

.mobile-menu-toggle:hover {
    opacity: 0.8;
}

.sidebar {
    transition: transform 0.3s ease;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* ============================================
   Admin Menu Grid
   ============================================ */

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.admin-menu-item {
    display: block;
    background: var(--light-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.admin-menu-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
}

.admin-menu-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 24px;
}

.admin-menu-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.admin-menu-item p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   Responsive Mobile Menu
   ============================================ */

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 70px;
        left: 0;
        width: 280px;
        height: calc(100vh - 70px);
        z-index: 999;
        transform: translateX(-100%);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-menu {
        display: block;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .sidebar-menu li {
        margin-bottom: 8px;
    }

    .container {
        flex-direction: column;
        padding: 15px;
    }

    .main-content {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-menu-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filters-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .api-docs-table {
        font-size: 12px;
    }

    .api-docs-table th,
    .api-docs-table td {
        padding: 10px 8px;
    }

    .api-code {
        font-size: 11px;
        padding: 8px;
    }
}

/* ============================================
   API Documentation
   ============================================ */

.api-info-box {
    background: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.api-info-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.api-docs-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.api-docs-table th:first-child,
.api-docs-table td:first-child {
    width: 80px;
    min-width: 80px;
}

.api-docs-table th:nth-child(2),
.api-docs-table td:nth-child(2) {
    width: 150px;
    min-width: 150px;
}

.api-docs-table th:nth-child(3),
.api-docs-table td:nth-child(3) {
    width: 200px;
    min-width: 200px;
}

.api-docs-table th {
    background: var(--light-color);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.api-docs-table td {
    padding: 15px;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

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

.api-method-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: white;
}

.api-method-badge.post {
    background: var(--primary-color);
}

.api-method-badge.get {
    background: var(--success-color);
}

.api-code {
    margin: 8px 0;
    padding: 10px;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

.api-code code {
    background: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
}

.api-docs-table td code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    display: inline-block;
    margin: 2px 0;
}

.api-docs-table td small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
}

.api-docs-table td strong {
    display: block;
    margin: 5px 0;
    font-size: 13px;
}

/* ============================================
   Chart Container
   ============================================ */

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
}

#statsChart {
    max-height: 400px;
}

/* ============================================
   End of Stylesheet
   ============================================ */