/* Backend Site Standard Styles - Dark Theme (Compact & Sleek) */

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

:root {
    /* Colors - Universal Backend Standard (from portfolio) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111;
    --bg-tertiary: #1a1a1a;
    --border-color: #2a2a2a;
    --text-primary: #fff;
    --text-secondary: #e0e0e0;
    --text-tertiary: #a0a0a0;
    --text-muted: #808080;
    
    /* Accent (teal - from portfolio.lofidawn.com) */
    --accent: #26a69a;
    --accent-hover: #2bbbad;
    --accent-active: #1f8a7e;
    
    --error: #ff6b6b;
    --error-bg: #1a0f0f;
    --error-border: #ef5350;
    --success: #4caf50;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 15px;
    padding-top: 100px; /* Space for sticky header */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Header - Professional */
header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

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

.logo {
    width: 50px;
    height: 50px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

header h1 {
    font-size: 1.4em;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.8em;
    color: var(--text-tertiary);
    font-weight: 400;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
}

/* Tabs - Compact */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.tab {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: all 0.2s;
}

.tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tab.active {
    background: var(--accent);
    color: var(--text-primary);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards - Compact */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 1.3em;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card h3 {
    font-size: 1.1em;
    font-weight: 400;
    margin-bottom: 12px;
    margin-top: 16px;
    color: var(--accent);
}

.card p {
    color: var(--text-tertiary);
    margin-bottom: 16px;
    font-size: 0.9em;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--accent);
}

.hero h2 {
    font-size: 2em;
    margin-bottom: 16px;
    color: var(--accent);
}

.hero-text {
    font-size: 1.1em;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid - Compact */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

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

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 300;
    color: var(--accent);
}

/* Quick Links */
.quick-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.quick-links h3 {
    margin-bottom: 12px;
}

.card-subtitle {
    color: var(--text-tertiary);
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* Links - Compact */
.link-list {
    list-style: none;
}

.link-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.link-list li:last-child {
    border-bottom: none;
}

.link-list a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.2s;
}

.link-list a:hover {
    color: var(--accent-hover);
}

/* Campaigns Grid - Professional */
.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.campaign-card {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.campaign-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-primary);
}

.campaign-type {
    font-size: 0.85em;
    color: var(--text-tertiary);
    margin: 0;
}

.status {
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-planning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-active {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

..campaign-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}

.detail-label {
    color: var(--text-tertiary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-secondary);
    text-align: right;
}

.campaign-actions {
    display: flex;
    gap: 8px;
}

/* Buttons - Sleek */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85em;
    transition: all 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

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

/* Resources Grid - Professional */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.resource-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.resource-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    color: var(--accent);
}

.resource-card h3 {
    font-size: 1.05em;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.resource-card p {
    color: var(--text-tertiary);
    font-size: 0.85em;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

.resource-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85em;
    align-self: flex-start;
}

.resource-card a:hover {
    color: var(--accent-hover);
}

/* Template Sections - Professional */
.template-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.template-section h3 {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.template-list {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.template-item {
    display: block;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background 0.2s;
}

.template-item:last-child {
    border-bottom: none;
}

.template-item:hover {
    background: var(--bg-tertiary);
}

.template-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95em;
    margin-bottom: 4px;
}

.template-desc {
    color: var(--text-tertiary);
    font-size: 0.85em;
}

/* Settings Menu */
.settings-menu {
    position: relative;
}

.settings-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
}

.settings-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 200; /* Above header (z-index: 100) */
    overflow: hidden;
}

.settings-dropdown.show {
    display: flex;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    width: 100%;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.settings-item svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 12px;
    }
    
    header {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .header-left {
        width: 100%;
        justify-content: center;
    }
    
    .header-text {
        align-items: center;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    .tabs {
        flex-direction: column;
        gap: 6px;
    }
    
    .campaign-actions {
        flex-direction: column;
    }
    
    .btn {
        text-align: center;
    }
    
    .stats-grid,
    .campaigns-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .detail-value {
        text-align: left;
    }
}
