/* PROFESSIONAL SAAS DESIGN - NO EMOJIS */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gold: #eab308;
    --gold-light: #fef3c7;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-900: #0f172a;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Manrope', -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-50);
}

h1,h2,h3,h4,h5,h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Twitter-Style Gold Verified Badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px #fef3c7;
}

.verified-badge i {
    color: #78350f;
}

.verified-icon {
    color: #f59e0b;
    margin-left: 0.25rem;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand img {
    height: 28px;
}

.nav-section {
    padding: 0.75rem 0;
}

.nav-label {
    padding: 0.5rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.5);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-link.active {
    background: rgba(37,99,235,0.15);
    color: white;
    border-left: 2px solid var(--primary);
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9375rem;
}

.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 1.5rem;
}

.page-header {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}

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

.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Card */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn i {
    font-size: 0.875rem;
}

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

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

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

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

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

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

/* Tables */
.table-wrapper {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
}

th {
    padding: 0.625rem 0.875rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
}

td {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

tbody tr:hover {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge i {
    font-size: 0.6875rem;
}

.badge-premium {
    background: #fef3c7;
    color: #92400e;
}

.badge-free {
    background: var(--gray-200);
    color: var(--gray-700);
}

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

/* File Upload */
.file-upload {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}

.file-upload:hover {
    border-color: var(--primary);
}

.file-upload input[type="file"] {
    display: none;
}

/* Utilities */
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.text-gray-600 { color: var(--gray-600); }
.mb-0 { margin-bottom: 0; }

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .main-content {
        margin-left: 0;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--gray-300);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
}

@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: block;
    }
    
    /* Hide desktop menu */
    .public-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--gray-200);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .public-menu.mobile-open {
        display: flex !important;
    }
    
    .public-menu li {
        width: 100%;
    }
    
    .public-menu a {
        display: block;
        padding: 0.75rem;
        border-radius: 6px;
    }
    
    .public-menu a:hover {
        background: var(--gray-50);
    }
    
    /* Responsive sidebar */
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    /* Responsive stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Responsive form grid */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Responsive tables - horizontal scroll */
    .table-wrapper {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Responsive cards */
    .card {
        padding: 1rem;
    }
    
    /* Responsive page header */
    .page-header {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    body {
        font-size: 0.8125rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch-friendly buttons */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .public-header,
    footer,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE DESIGN FIXES
   ============================================ */

/* Mobile First - Base Styles Already Mobile Friendly */

/* Tablets and Small Desktops (768px - 1024px) */
@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 250px 1fr;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.mobile-open {
        left: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header > div:last-child {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .page-header .btn {
        flex: 1;
    }
    
    .table-wrapper {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card {
        min-width: 100% !important;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 999;
        width: 48px;
        height: 48px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    }
    
    .mobile-menu-btn i {
        font-size: 1.5rem;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .page-header .btn,
    .mobile-menu-btn,
    .nav-link,
    button {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sidebar-brand img {
        image-rendering: -webkit-optimize-contrast;
    }
}
