:root {
    /* Modern Color System */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;

    /* Gradient System */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Background System */
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfc;
    --bg-dark: #0f172a;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
}

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

.modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(to bottom, white, var(--gray-50));
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.close-modal, .close-modal-share, .close-modal-preview {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-base);
}

.close-modal:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    padding: var(--space-xl);
    overflow-y: auto;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

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

.modal-footer {
    padding: var(--space-xl);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    background: var(--gray-50);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group label svg {
    color: var(--primary);
}

.modern-input, .modern-select, .modern-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--gray-900);
    font-family: inherit;
    transition: all var(--transition-base);
}

.modern-input:focus, .modern-select:focus, .modern-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modern-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.modern-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    color: var(--gray-600);
    transition: all var(--transition-base);
}

.file-upload-wrapper:hover .file-upload-ui {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.current-file {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.current-file a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.current-file a:hover {
    text-decoration: underline;
}

/* Modern Checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    user-select: none;
}

.modern-checkbox input {
    position: absolute;
    opacity: 0;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.modern-checkbox input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-check {
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.modern-checkbox input:checked + .checkbox-custom .checkbox-check {
    opacity: 1;
}

.checkbox-label {
    font-size: 0.9375rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* ============================================
   PREVIEW MODAL
   ============================================ */

.preview-modal {
    background: rgba(0, 0, 0, 0.95);
}

.close-modal-preview {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.close-modal-preview:hover {
    background: white;
    color: var(--gray-900);
}

.preview-container {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90vh;
}

.preview-container img, .preview-container video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
}

/* ============================================
   TOAST
   ============================================ */

.toast {
    position: fixed;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-2xl);
    z-index: 9999;
    animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.hidden {
    display: none;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    color: var(--gray-600);
    font-weight: 600;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-page {
    background: var(--gray-900);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.login-bg-animated {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.gradient-orb.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    top: -200px;
    left: -200px;
}

.gradient-orb.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--gradient-secondary);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.gradient-orb.orb-3 {
    width: 450px;
    height: 450px;
    background: var(--gradient-accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 700px;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

/* Left Pane */
.login-brand-pane {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 50%, #1e3a8a 100%);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.brand-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 20s infinite;
}

.particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 40%; left: 60%; animation-delay: -5s; }
.particle:nth-child(3) { top: 60%; left: 30%; animation-delay: -10s; }
.particle:nth-child(4) { top: 80%; left: 70%; animation-delay: -15s; }
.particle:nth-child(5) { top: 30%; left: 80%; animation-delay: -20s; }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

.brand-header {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 160px;
    height: auto;
    filter: brightness(0) invert(1);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.3)); }
    50% { filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255,255,255,0.6)); }
}

.brand-content {
    position: relative;
    z-index: 1;
}

.modern-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    margin-bottom: var(--space-xl);
}

.pulse-glow {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.brand-headline {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: white;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: var(--space-xl);
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
}

.brand-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Right Pane */
.login-form-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: white;
}

.form-container {
    width: 100%;
    max-width: 440px;
}

.form-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.app-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.icon-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.app-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.app-description {
    font-size: 1rem;
    color: var(--gray-600);
}

.auth-actions {
    margin-bottom: var(--space-2xl);
}

.btn-google-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

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

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.google-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-with-text {
    position: relative;
    text-align: center;
    margin: var(--space-xl) 0;
}

.divider-with-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.divider-with-text span {
    position: relative;
    background: white;
    padding: 0 var(--space-md);
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 600;
}

.alternative-options {
    margin-top: var(--space-lg);
}

.alt-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 0.875rem;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: not-allowed;
    transition: all var(--transition-base);
}

.form-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

.checkbox-modern {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    cursor: pointer;
}

.checkbox-modern input {
    position: absolute;
    opacity: 0;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.checkbox-modern input:checked + .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-check {
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.checkbox-modern input:checked + .checkbox-box .checkbox-check {
    opacity: 1;
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
}

.footer-link:hover {
    color: var(--primary);
}

.trust-indicators {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
}

.trust-item svg {
    color: var(--gray-400);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
    display: none !important;
}

.fade-in-entrance {
    animation: fadeInEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        flex-direction: row;
        padding: var(--space-lg) var(--space-xl);
    }

    .sidebar-header, .sidebar-nav, .sidebar-footer {
        display: flex;
        align-items: center;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: var(--space-sm);
        flex: 1;
        margin: 0 var(--space-xl);
    }

    .nav-item span {
        display: none;
    }

    .data-table thead { display: none; }

    .bento-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "timeline actions"
            "strategy strategy"
            "creative creative"
            "execution execution";
    }

    .col-timeline { grid-area: timeline; }
    .col-strategy { grid-area: strategy; border-left: none; padding-left: 0 !important; }
    .col-creative { grid-area: creative; border-left: none; padding-left: 0 !important; }
    .col-execution { grid-area: execution; border-left: none; padding-left: 0 !important; }
    .col-actions { grid-area: actions; border-left: none; padding-left: 0 !important; }
}

@media (max-width: 960px) {
    .login-wrapper {
        flex-direction: column;
        height: auto;
    }

    .login-brand-pane {
        flex: 0 0 auto;
        padding: var(--space-2xl) var(--space-lg);
    }

    .brand-headline {
        font-size: 2rem;
    }

    .trust-indicators {
        position: relative;
        transform: none;
        left: 0;
        bottom: 0;
        margin-top: var(--space-xl);
    }
}

@media (max-width: 640px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .app-container {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .modal {
        padding: var(--space-md);
    }

    .modern-modal {
        width: 100%;
        max-height: 95vh;
    }
};
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: #667eea;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #f093fb;
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #4facfe;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-50px, 50px) scale(0.9); }
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
    height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
}

/* ============================================
   GLASS PANELS
   ============================================ */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    position: relative;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    position: relative;
}

.sidebar-header {
    margin-bottom: var(--space-2xl);
}

.brand-container {
    position: relative;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-brand-logo {
    width: 140px;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

.brand-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

/* Navigation Items */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--bg-primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

.nav-item.active .nav-indicator {
    display: block;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-indicator {
    display: none;
    position: absolute;
    right: var(--space-lg);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
}

.logout-btn {
    margin-top: auto;
    color: var(--error);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.5);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.app-brand-title-main {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.05em;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
}

.status-dot.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

.status-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-hover-glow:hover {
    filter: brightness(1.1);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover .btn-shine {
    left: 100%;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

/* ============================================
   TABLE CONTAINER
   ============================================ */

.content-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.table-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
}

.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================
   DATA TABLE
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 var(--space-md);
}

.data-table thead tr {
    display: grid;
    grid-template-columns: 100px 1.2fr 1.5fr 2fr 180px;
    gap: var(--space-md);
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-sm);
}

.data-table th {
    text-align: left;
    padding: 0;
    background: transparent;
    border: none;
}

.th-content {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    padding: var(--space-sm) 0;
}

.bento-row {
    display: grid;
    grid-template-columns: 100px 1.2fr 1.5fr 2fr 180px;
    gap: var(--space-md);
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.5s ease-out;
    position: relative;
}

.bento-row::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.bento-row:hover::before {
    opacity: 1;
}

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

.bento-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.bento-row td {
    padding: 0;
    background: transparent;
    border: none;
}

/* Timeline Column */
.col-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 90px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-200);
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
}

.timeline-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.date-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.month {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--gray-600);
    letter-spacing: 0.05em;
}

.week-mono {
    margin-top: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* Strategy Column */
.col-strategy {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.theme-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition-base);
}

.bento-row:hover .theme-title {
    color: var(--primary);
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.region-badge, .pillar-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.region-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.pillar-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Creative Column */
.col-creative {
    border-left: 2px dashed var(--gray-200);
    padding-left: var(--space-md) !important;
}

.concept-text {
    font-size: 0.9375rem;
    font-weight: 600;
    font-style: italic;
    color: var(--gray-800);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.key-message-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Execution Column */
.col-execution {
    border-left: 2px dashed var(--gray-200);
    padding-left: var(--space-md) !important;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.visual-line {
    font-size: 0.8125rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.label-muted {
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
}

.asset-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.visual-thumb-sm {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.visual-thumb-sm::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(102,126,234,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.visual-thumb-sm:hover {
    transform: scale(1.8);
    z-index: 100;
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary);
}

.visual-thumb-sm:hover::after {
    opacity: 1;
}

/* Video Thumbnail Enhancements */
.video-thumb {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    color: white;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: all var(--transition-base);
}

.video-thumb:hover .play-icon {
    transform: scale(1.2);
}

/* Video Regenerate Button */
.video-regenerate, .image-regenerate {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-base);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.video-regenerate svg, .image-regenerate svg {
    color: var(--primary);
}

.video-thumb:hover .video-regenerate,
.visual-thumb-sm:hover .image-regenerate {
    opacity: 1;
}

.video-regenerate:hover, .image-regenerate:hover {
    background: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.video-regenerate:hover svg, .image-regenerate:hover svg {
    color: white;
    animation: spin 0.5s ease-in-out;
}

.video-regenerate:active, .image-regenerate:active {
    transform: scale(0.95);
}

.visual-placeholder-sm {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.visual-placeholder-sm:hover {
    background: var(--gray-200);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.cta-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-left: auto;
}

.btn-text-toggle {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs) 0;
    transition: all var(--transition-base);
}

.btn-text-toggle:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.details-panel {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-sm);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.detail-block {
    margin-bottom: var(--space-sm);
}

.detail-block:last-child {
    margin-bottom: 0;
}

.detail-block p {
    font-size: 0.8125rem;
    color: var(--gray-700);
    line-height: 1.5;
    margin-top: var(--space-xs);
}

.hashtag-text {
    color: var(--primary) !important;
    font-weight: 600;
}

/* Actions Column */
.col-actions {
    border-left: 1px solid var(--gray-200);
    padding-left: var(--space-md) !important;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.status-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.status-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.status-pill:hover::before {
    transform: translateX(100%);
}

.status-Draft {
    background: rgba(156, 163, 175, 0.1);
    color: var(--gray-600);
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.status-Review {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-Approved {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-Published {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.done-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: default;
}

.done-check input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

input:checked + .checkmark {
    background: var(--success);
    border-color: var(--success);
}

input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.done-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Button Enhancements */
.btn-hover-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.action-divider {
    height: 1px;
    background: var(--gray-200);
    width: 100%;
    margin: var(--space-sm) 0;
}

.action-cluster-vertical {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-start;
}

.action-btn-mini {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.action-btn-mini:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   MODAL SYSTEM (Restored)
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    opacity: 1;
    visibility: visible;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    transition: opacity var(--transition-base);
}

.modal.hidden .modal-backdrop {
    opacity: 0;
}

.modern-modal {
    position: relative;
    width: 600px;
    max-width: 100%;
    max-height: 85vh;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(0) scale(1);
    transition: transform var(--transition-bounce);
    z-index: 1001;
}

.modal.hidden .modern-modal {
    transform: translateY(20px) scale(0.95);
}

/* Modal Dark Backdrop for Preview */
.modal-backdrop.dark {
    background: rgba(0, 0, 0, 0.9);
}