/* assets/css/styles.css - FeelFirst Share Design System & Material Dark Blue Theme */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette: Dark Blue Hues */
    --bg-main: #090d16;
    --bg-dark: #0b132b;
    --navy-surface: #131c35;
    --navy-card: #1c2541;
    --navy-hover: #253256;
    --navy-border: #2e3d67;

    /* Accents */
    --primary-blue: #1d4ed8;
    --primary-light: #3b82f6;
    --accent-cyan: #38bdf8;
    --accent-teal: #14b8a6;
    
    /* Text Hierarchy */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Status Colors */
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);

    /* Material Design Shadows & Elevation */
    --elevation-1: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 2px rgba(56, 189, 248, 0.05);
    --elevation-2: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 4px rgba(56, 189, 248, 0.1);
    --elevation-3: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 8px rgba(56, 189, 248, 0.15);
    --elevation-4: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.2);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography Hierarchy */
h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
}

p, span, div {
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.text-cyan {
    color: var(--accent-cyan);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-customer {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-editor {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-admin {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* App Shell Layout */
#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Bar */
.app-header {
    height: 64px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--navy-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--elevation-1);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--navy-card);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--navy-border);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Layout Body */
.app-body {
    display: flex;
    flex: 1;
}

/* Sidebar Drawer */
.app-drawer {
    width: 260px;
    background: var(--bg-dark);
    border-right: 1px solid var(--navy-border);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    gap: 8px;
    transition: transform var(--transition-normal);
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.drawer-nav-item:hover {
    background: var(--navy-surface);
    color: var(--text-primary);
}

.drawer-nav-item.active {
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.4), rgba(56, 189, 248, 0.1));
    color: var(--accent-cyan);
    border-left: 4px solid var(--accent-cyan);
}

.drawer-icon {
    font-size: 1.25rem;
}

/* Main Content Container */
.main-content {
    flex: 1;
    padding: 32px;
    background: var(--bg-main);
    overflow-y: auto;
}

/* Card Styling */
.card {
    background: var(--navy-card);
    border: 1px solid var(--navy-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--elevation-2);
    margin-bottom: 24px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    border-color: rgba(56, 189, 248, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--navy-border);
}

/* Metrics Counter Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: linear-gradient(135deg, var(--navy-card), var(--navy-surface));
    border: 1px solid var(--navy-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--elevation-1);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-val {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--navy-surface);
    color: var(--text-secondary);
    border: 1px solid var(--navy-border);
}

.btn-secondary:hover {
    background: var(--navy-hover);
    color: var(--text-primary);
}

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

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
    background: var(--bg-dark);
    border: 1px solid var(--navy-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Drag and Drop File Upload Area */
.file-drop-zone {
    border: 2px dashed var(--navy-border);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    text-align: center;
    background: var(--bg-dark);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.drop-icon {
    font-size: 2.8rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--navy-border);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background: var(--bg-dark);
    padding: 14px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--navy-border);
}

.custom-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--navy-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.custom-table tbody tr {
    transition: background var(--transition-fast);
}

.custom-table tbody tr:hover {
    background: var(--navy-surface);
}

/* Modal System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--navy-card);
    border: 1px solid var(--navy-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    padding: 28px;
    box-shadow: var(--elevation-4);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-card {
    transform: translateY(0);
}

/* Auth Modal Card Specifics */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top right, #1c2541 0%, #090d16 60%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--navy-card);
    border: 1px solid var(--navy-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--elevation-3);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.captcha-img-box {
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--navy-border);
}

.captcha-refresh-btn {
    background: var(--navy-surface);
    border: 1px solid var(--navy-border);
    color: var(--accent-cyan);
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.captcha-refresh-btn:hover {
    background: var(--navy-hover);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--navy-card);
    color: var(--text-primary);
    border-left: 4px solid var(--accent-cyan);
    box-shadow: var(--elevation-3);
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 280px;
    animation: slideIn 0.3s ease-out forwards;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-drawer {
        position: fixed;
        left: -260px;
        top: 64px;
        bottom: 0;
        z-index: 50;
    }

    .app-drawer.open {
        transform: translateX(260px);
    }

    .main-content {
        padding: 16px;
    }
}
