/* ============================================================
   CryptoUnity Creator Portal - Custom Styles
   Brand: deep navy (#1a1a2e), gold accent (#f0a500), white content
   Built on Bootstrap 3.4.1
   ============================================================ */

/* ---- CSS Variables (fallback for older browsers via direct values) ---- */
:root {
    --cu-navy: #1a1a2e;
    --cu-navy-light: #16213e;
    --cu-navy-dark: #0f0f1a;
    --cu-gold: #f0a500;
    --cu-gold-light: #f5c343;
    --cu-gold-dark: #cc8c00;
    --cu-white: #ffffff;
    --cu-gray-light: #f5f6fa;
    --cu-gray: #8a8a9a;
    --cu-text: #2d2d3a;
    --cu-sidebar-width: 250px;
}

/* ---- Global ---- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f6fa;
    color: #2d2d3a;
    margin: 0;
    padding: 0;
}

a {
    color: #1a1a2e;
}

a:hover, a:focus {
    color: #f0a500;
    text-decoration: none;
}

/* ---- Auth Layout ---- */
.auth-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    margin: 0 auto;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo .brand-text {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.auth-logo .brand-sub {
    display: block;
    font-size: 13px;
    color: #f0a500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

.auth-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.btn-auth {
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

/* ---- Sidebar ---- */
.creator-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: #1a1a2e;
    color: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    text-decoration: none;
    color: #fff;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: #fff;
    text-decoration: none;
}

.sidebar-brand .brand-text {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sidebar-brand .brand-sub {
    display: block;
    font-size: 11px;
    color: #f0a500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.sidebar-creator {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.creator-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #f0a500;
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #16213e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #f0a500;
}

.creator-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.creator-tier {
    display: inline-block;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f0a500, #f5c343);
    color: #1a1a2e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a i {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: rgba(240, 165, 0, 0.5);
}

.sidebar-nav li.active a {
    background: rgba(240, 165, 0, 0.1);
    color: #f0a500;
    border-left-color: #f0a500;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 14px;
}

.sidebar-logout i {
    font-size: 18px;
    margin-right: 10px;
}

.sidebar-logout:hover {
    color: #e74c3c;
}

/* ---- Main Content Area ---- */
.creator-main {
    margin-left: 250px;
    min-height: 100vh;
    background: #f5f6fa;
}

/* ---- Top Bar ---- */
.creator-topbar {
    background: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid #e8e8ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #1a1a2e;
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
}

.topbar-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-user {
    font-size: 14px;
    color: #8a8a9a;
}

/* ---- Page Content ---- */
.creator-content {
    padding: 25px;
}

/* ---- Footer ---- */
.creator-footer {
    padding: 15px 25px;
    text-align: center;
    color: #8a8a9a;
    font-size: 12px;
    border-top: 1px solid #e8e8ef;
}

/* ---- Stat Cards ---- */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #ddd;
    transition: transform 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.stat-referrals { border-left-color: #3498db; }
.stat-card.stat-active { border-left-color: #2ecc71; }
.stat-card.stat-earnings { border-left-color: #f0a500; }
.stat-card.stat-content { border-left-color: #9b59b6; }

.stat-icon {
    font-size: 36px;
    margin-right: 15px;
    width: 50px;
    text-align: center;
}

.stat-referrals .stat-icon { color: #3498db; }
.stat-active .stat-icon { color: #2ecc71; }
.stat-earnings .stat-icon { color: #f0a500; }
.stat-content .stat-icon { color: #9b59b6; }

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #8a8a9a;
}

/* ---- Panels ---- */
.panel {
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.panel-heading {
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #eee;
}

.panel-default > .panel-heading {
    background: #fff;
    color: #1a1a2e;
}

.panel-title {
    font-weight: 600;
    font-size: 15px;
}

/* ---- Tables ---- */
.table > thead > tr > th {
    border-bottom: 2px solid #e8e8ef;
    color: #8a8a9a;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table > tbody > tr > td {
    vertical-align: middle;
}

/* ---- Status Badges / Labels ---- */
.label {
    font-weight: 500;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 3px;
}

.label-purple {
    background-color: #9b59b6;
    color: #fff;
}

/* ---- Preview Content ---- */
.preview-content {
    line-height: 1.8;
    font-size: 15px;
}

.preview-content h2,
.preview-content h3,
.preview-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.preview-content p {
    margin-bottom: 12px;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-meta {
    font-size: 13px;
    color: #8a8a9a;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8ef;
}

.preview-meta span {
    margin-right: 15px;
}

/* ---- Video Player Placeholder ---- */
.video-placeholder {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

.video-placeholder i {
    font-size: 48px;
    color: #f0a500;
    display: block;
    margin-bottom: 10px;
}

.video-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ---- Upload Progress ---- */
.upload-progress {
    display: none;
    margin-top: 10px;
}

.upload-progress .progress {
    height: 24px;
    border-radius: 12px;
    margin-bottom: 5px;
}

.upload-progress .progress-bar {
    line-height: 24px;
    font-weight: 600;
}

.upload-progress .upload-status {
    font-size: 12px;
    color: #8a8a9a;
}

/* ---- Review Notes Alert ---- */
.review-notes {
    background-color: #fdf2e9;
    border-color: #f0a500;
    border-left: 4px solid #f0a500;
    color: #2d2d3a;
}

.review-notes strong {
    color: #cc8c00;
}

/* ---- Content Type Tabs ---- */
.content-type-tabs > li > a {
    border-radius: 4px;
}

/* ---- Tier Badge ---- */
.tier-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0a500, #f5c343);
    color: #1a1a2e;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Tier Progress Bar ---- */
.tier-progress-bar {
    height: 24px;
    border-radius: 12px;
    background-color: #e8e8ef;
}

.tier-progress-bar .progress-bar {
    line-height: 24px;
    border-radius: 12px;
    font-weight: 600;
}

/* ---- Buttons (primary = navy+gold) ---- */
.btn-primary {
    background-color: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #f0a500;
    border-color: #f0a500;
    color: #1a1a2e;
}

/* ---- Flash Messages ---- */
.flash-container {
    padding-top: 0;
}

.flash-message {
    border-radius: 4px;
    margin: 15px 25px 0 25px;
}

/* ---- Notification Preview ---- */
.notification-preview {
    padding: 10px;
}

.notif-preview-card {
    background: #f5f6fa;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.notif-preview-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    color: #8a8a9a;
}

.notif-preview-app {
    font-weight: 600;
}

.notif-preview-body {
    display: flex;
    gap: 10px;
}

.notif-preview-text {
    flex: 1;
}

.notif-preview-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.notif-preview-text p {
    font-size: 13px;
    color: #555;
    margin: 0;
}

.notif-preview-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.notif-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Profile Avatar ---- */
.avatar-placeholder-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #f5f6fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #ccc;
    margin: 0 auto;
    border: 3px solid #e8e8ef;
}

/* ---- Dropzone ---- */
.dropzone-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: border-color 0.2s;
}

.dropzone-area:hover {
    border-color: #f0a500;
}

/* ---- Sidebar Overlay (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .creator-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .creator-sidebar.open {
        transform: translateX(0);
    }

    .creator-main {
        margin-left: 0;
    }

    .topbar-title {
        font-size: 16px;
    }

    .creator-content {
        padding: 15px;
    }

    .stat-card {
        margin-bottom: 10px;
    }
}

@media (max-width: 767px) {
    .auth-card {
        padding: 30px 20px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-icon {
        font-size: 28px;
    }
}
