@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border-color: #d2d2d7;
    --border-glow: #0066cc;
    
    --color-text-main: #1d1d1f;
    --color-text-muted: #86868b;
    
    --primary: #0066cc; /* Apple Blue */
    --primary-glow: rgba(0, 102, 204, 0.15);
    --secondary: #6e6e73; /* Apple Gray */
    --accent-cyan: #555557; /* Slate */
    
    --success: #24b24b;
    --warning: #ff9f0a;
    --danger: #ff453a;
    
    --transition: all 0.2s ease-in-out;
    --border-radius: 12px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Sarabun', sans-serif;
}

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

body {
    background-color: var(--bg-secondary);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation (Clean Apple Style) */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
    padding: 4px;
}

.sidebar-brand i {
    font-size: 24px;
    color: var(--color-text-main);
}

.sidebar-brand h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    width: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.nav-link i {
    font-size: 16px;
}

.nav-link:hover {
    color: var(--color-text-main);
    background-color: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--color-text-main);
    background-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8e8ed;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.user-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
}

.user-info p {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 40px 48px;
    background-color: var(--bg-primary);
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.page-title h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-text-main);
}

.page-title p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px; /* Apple Rounded Buttons */
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn:hover {
    background-color: #0077ed;
}

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

.btn-secondary:hover {
    background-color: #e8e8ed;
}

/* Page Contents */
.page-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page-section.active {
    display: block;
}

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

/* Card System (Clean Minimalist Cards) */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 28px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    margin-bottom: 0;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.blue { background: rgba(0, 102, 204, 0.08); color: var(--primary); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.08); color: #8f39ec; }
.stat-icon.cyan { background: rgba(85, 85, 87, 0.08); color: var(--color-text-main); }
.stat-icon.green { background: rgba(36, 178, 75, 0.08); color: var(--success); }

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 6px;
    color: var(--color-text-main);
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.stat-trend {
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* Dashboard Charts Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 24px;
    letter-spacing: -0.2px;
}

.chart-container {
    height: 320px;
    position: relative;
}

/* Kanban Board Module */
.kanban-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    gap: 6px;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--color-text-main);
    background: rgba(0, 0, 0, 0.04);
}

.filter-btn.active {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--color-text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.kanban-column {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.column-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-count {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 400px;
    overflow-y: auto;
}

.kanban-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    cursor: grab;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.kanban-card:hover {
    border-color: #86868b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.card-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.tag-creative { background: rgba(168, 85, 247, 0.08); color: #8f39ec; }
.tag-production { background: rgba(0, 102, 204, 0.08); color: var(--primary); }
.tag-editing { background: rgba(85, 85, 87, 0.08); color: var(--color-text-main); }
.tag-sales { background: rgba(36, 178, 75, 0.08); color: var(--success); }

.card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 6px;
    line-height: 1.4;
}

.card-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 11px;
    color: var(--color-text-muted);
}

.card-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
}

.assignee-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e8e8ed;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
}

/* Equipment Booking Module */
.equipment-layout {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 24px;
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.equipment-table th, .equipment-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.equipment-table th {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-available { background: rgba(36, 178, 75, 0.08); color: var(--success); }
.status-in-use { background: rgba(0, 102, 204, 0.08); color: var(--primary); }
.status-maintenance { background: rgba(255, 159, 10, 0.08); color: var(--warning); }
.status-damaged { background: rgba(255, 69, 58, 0.08); color: var(--danger); }

.booking-calendar-card {
    display: flex;
    flex-direction: column;
}

.calendar-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 16px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.calendar-day:hover {
    background: rgba(0, 102, 204, 0.05);
    color: var(--primary);
}

.calendar-day.booked {
    background: rgba(0, 102, 204, 0.08);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

.calendar-day.muted {
    opacity: 0.15;
    cursor: default;
    background: transparent;
    border: none;
}

/* Simulated QR Code Scan Interface */
.qr-scanner-card {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.scanner-viewfinder {
    width: 180px;
    height: 180px;
    border: 2px dashed var(--secondary);
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    overflow: hidden;
}

.scanner-viewfinder::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary);
    top: 0;
    box-shadow: 0 0 8px var(--primary);
    animation: scanAnimation 2s infinite ease-in-out;
}

@keyframes scanAnimation {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* Social Media Deep Analytics Module */
.social-platform-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.platform-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin-bottom: 0;
}

.platform-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.platform-youtube { background: #ff453a; }
.platform-tiktok { background: #1d1d1f; }
.platform-facebook { background: #0066cc; }
.platform-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.platform-info h4 {
    font-size: 13px;
    color: var(--color-text-muted);
}

.platform-info p {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 4px;
    color: var(--color-text-main);
}

.analytics-grid-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Sentiment Analysis UI */
.sentiment-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px 0;
}

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

.sentiment-meter-bar {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        var(--success) 0% 65%,
        var(--warning) 65% 85%,
        var(--danger) 85% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.sentiment-meter-inner {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sentiment-meter-inner span.percent {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-main);
}

.sentiment-meter-inner span.label {
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.sentiment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sentiment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-main);
}

.sentiment-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-positive { background-color: var(--success); }
.dot-neutral { background-color: var(--warning); }
.dot-negative { background-color: var(--danger); }

/* ROI Calculator UI */
.roi-calculator {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.form-group input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--color-text-main);
    font-family: var(--font-sans);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.roi-result {
    margin-top: 10px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.roi-result-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

/* Google Settings Connect Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.settings-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.settings-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.icon-drive { background-color: #34a853; }
.icon-calendar { background-color: #4285f4; }
.icon-gmail { background-color: #ea4335; }

.settings-card-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-main);
}

.settings-card-title p {
    font-size: 12px;
    color: var(--color-text-muted);
}

.sync-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-main);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 500px;
    max-width: 90%;
    padding: 32px;
    position: relative;
    transform: scale(0.95);
    transition: var(--transition);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--color-text-main);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .equipment-layout {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid-row {
        grid-template-columns: 1fr;
    }
}

/* Tablet & Mobile Screens Override */
@media (max-width: 768px) {
    /* Layout */
    .app-container {
        flex-direction: column;
    }
    
    /* Sliding Mobile Sidebar */
    .sidebar {
        width: 260px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Overlay dim background */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px 16px;
        width: 100%;
    }
    
    /* Header layout */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .header-left-wrap {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-menu-btn {
        display: block !important;
        background: transparent;
        border: none;
        font-size: 22px;
        color: var(--color-text-main);
        cursor: pointer;
        padding: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }
    
    .mobile-menu-btn:hover {
        color: var(--primary);
    }
    
    .page-title h2 {
        font-size: 24px;
    }
    
    .page-title p {
        font-size: 13px;
    }
    
    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .role-selector-wrap {
        flex-grow: 1;
        justify-content: center;
        width: 100%;
        margin-right: 0 !important;
    }
    
    .btn {
        flex-grow: 1;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Overview KPI Cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Social Platform Cards */
    .social-platform-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Mobile Tables horizontal scroll wrapper */
    .equipment-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Modals adjustment */
    .modal-content {
        padding: 24px 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .social-platform-cards {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .role-selector-wrap {
        justify-content: space-between;
    }
    
    .btn {
        width: 100%;
    }
}

/* Authentication Modal & Portal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(245, 245, 247, 0.95); /* Apple light background blurred */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.auth-modal-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 420px;
    max-width: 90%;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.auth-brand h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.5px;
}

.auth-brand p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.auth-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.auth-tab.active {
    background: #ffffff;
    color: var(--color-text-main);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-btn {
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    transition: var(--transition);
}

/* Hover effects for Logout button */
.btn-logout:hover {
    background-color: rgba(255, 69, 58, 0.08) !important;
}

/* --- SOCIAL ENGAGEMENT SUB-TABS & UI --- */
.sub-tab-btn {
    position: relative;
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: var(--transition);
}
.sub-tab-btn:hover {
    color: var(--color-text-main) !important;
}

.badge-fb { background: rgba(24, 119, 242, 0.12) !important; color: #1877f2 !important; border: 1px solid rgba(24, 119, 242, 0.2); }
.badge-yt { background: rgba(255, 0, 0, 0.12) !important; color: #ff0000 !important; border: 1px solid rgba(255, 0, 0, 0.2); }
.badge-tt { background: rgba(255, 255, 255, 0.06) !important; color: var(--color-text-main) !important; border: 1px solid var(--border-color); }
.badge-ig { background: rgba(225, 48, 108, 0.12) !important; color: #e1306c !important; border: 1px solid rgba(225, 48, 108, 0.2); }

.sub-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.sub-tab-content.active {
    display: block;
}

/* Add custom highlight styles for professional table stats alert */
.badge-high-retention {
    background: rgba(36, 178, 75, 0.12) !important;
    color: var(--success) !important;
    border: 1px solid rgba(36, 178, 75, 0.25);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.badge-repeat-warning {
    background: rgba(255, 69, 58, 0.12) !important;
    color: var(--danger) !important;
    border: 1px solid rgba(255, 69, 58, 0.25);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
}

/* Print Dropdown Styling */
.dropdown-item-print:hover {
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--primary) !important;
}

