/* SEVEN - Premium Editorial Design System */
/* Designed with strict grid lines, clean hierarchy, and compact typography */

:root {
    --ink: #151515;
    --canvas: #F7F6F2;
    --stone: #E5E3DD;
    --white: #FFFFFF;
    --green: #708A73;
    --green-light: #E8EFE8;
    --yellow: #D9B85B;
    --yellow-light: #F5EFD8;
    --red: #B85C5C;
    --red-light: #F6E5E5;
    --muted: #77746E;
    --border: #DDDAD2;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Editorial Layout Constants */
    --radius-sm: 2px; /* Sharp, high-end editorial corners */
    --radius-md: 4px;
    --transition-fast: 120ms ease;
    --transition-normal: 200ms ease;
}

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

body {
    background-color: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px; /* Crisp desktop base */
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ink);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--muted);
}

/* Standardized Typography Scale */
h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 1.75rem; /* 24.5px - Quietly confident */
}

h2 {
    font-size: 1.25rem; /* 17.5px */
}

h3 {
    font-size: 1.05rem; /* 14.7px */
}

h4 {
    font-size: 0.95rem;
}

p {
    font-size: 0.9rem; /* 12.6px */
    line-height: 1.55;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

.text-dark {
    color: var(--ink) !important;
}

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

/* Layout Utilities */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.grid {
    display: grid;
    gap: 1.25rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mt-1 { margin-top: 0.35rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.35rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.15rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    letter-spacing: -0.01em;
    outline: none;
}

.btn:focus-visible {
    box-shadow: 0 0 0 2px var(--stone), 0 0 0 4px var(--ink);
}

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

.btn-primary:hover {
    background-color: var(--muted);
    color: var(--white);
}

.btn-primary:active {
    background-color: #000000;
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border);
    color: var(--ink);
}

.btn-secondary:hover {
    background-color: var(--stone);
    border-color: var(--muted);
}

.btn-secondary:active {
    background-color: var(--border);
}

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

.btn-positive:hover {
    background-color: #5c755f;
}

.btn-positive:active {
    background-color: #4b614e;
}

.btn-warning {
    background-color: var(--yellow);
    color: var(--ink);
}

.btn-warning:hover {
    background-color: #c2a14b;
}

.btn-warning:active {
    background-color: #a8883b;
}

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

.btn-danger:hover {
    background-color: #a34e4e;
}

.btn-danger:active {
    background-color: #8c3f3f;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State Component */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    max-width: 480px;
    margin: 1.5rem auto;
}

.empty-state-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.empty-state-desc {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Badge System */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.badge-published, .badge-approved, .badge-paid, .badge-on-track {
    background-color: var(--green-light);
    color: #3b573e;
    border-color: rgba(112, 138, 115, 0.25);
}

.badge-awaiting_client, .badge-internal_review, .badge-pending {
    background-color: var(--yellow-light);
    color: #8b6d1b;
    border-color: rgba(217, 184, 91, 0.25);
}

.badge-rejected, .badge-failed, .badge-overdue {
    background-color: var(--red-light);
    color: #8b3c3c;
    border-color: rgba(184, 92, 92, 0.25);
}

.badge-draft, .badge-scheduled, .badge-archived, .badge-default {
    background-color: var(--stone);
    color: var(--muted);
    border-color: var(--border);
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--ink);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--ink);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input {
    margin-top: 0.2rem;
}

/* Shell Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 230px;
    background-color: var(--ink);
    color: var(--canvas);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    border-right: 1px solid var(--ink);
}

.app-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--white);
    margin-bottom: 2rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--stone);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-menu-item a:hover,
.sidebar-menu-item.active a {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    font-size: 0.8rem;
    color: var(--stone);
}

.sidebar-user-name {
    font-weight: 600;
    color: var(--white);
}

.app-content {
    margin-left: 230px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-body {
    padding: 2rem 2.5rem;
    flex: 1;
    max-width: 960px;
    width: 100%;
}

/* Admin Impersonation Banner */
.impersonation-banner {
    background-color: var(--yellow-light);
    border-bottom: 1px solid var(--yellow);
    padding: 0.4rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: #8b6d1b;
}

.impersonation-banner a {
    color: var(--ink);
    text-decoration: underline;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Card System */
.card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    transition: border-color var(--transition-fast);
}

.card:hover {
    border-color: var(--muted);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Dashboard Specifics */
.status-hero {
    margin-bottom: 2rem;
}

.status-hero-label {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.status-hero-value {
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: -0.03em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

/* Alert Banners */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.alert-info {
    background-color: var(--stone);
    border: 1px solid var(--border);
    color: var(--ink);
}

.alert-success {
    background-color: var(--green-light);
    border: 1px solid var(--green);
    color: #3b573e;
}

.alert-warning {
    background-color: var(--yellow-light);
    border: 1px solid var(--yellow);
    color: #8b6d1b;
}

.alert-danger {
    background-color: var(--red-light);
    border: 1px solid var(--red);
    color: #8b3c3c;
}

/* Timeline & List view */
.timeline {
    position: relative;
    padding-left: 1.25rem;
    border-left: 1px solid var(--border);
    margin-top: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: calc(-1.25rem - 3.5px);
    top: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--border);
    border: 1px solid var(--white);
}

.timeline-item.active .timeline-marker {
    background-color: var(--ink);
}

.timeline-date {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.timeline-content {
    background-color: var(--white);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tab menu */
.tabs {
    display: flex;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-item {
    padding: 0.5rem 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-item:hover, .tab-item.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    background-color: var(--white);
}

.calendar-day-header {
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.775rem;
    background-color: var(--canvas);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.calendar-cell {
    min-height: 90px;
    padding: 0.35rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-cell.other-month {
    background-color: var(--canvas);
    opacity: 0.4;
}

.calendar-day-num {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.calendar-posts {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.calendar-post-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.25rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Public Landing Page Design (Chris Do Editorial Grid Layout) */
.landing-page-wrap {
    background-color: var(--canvas);
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center top;
    min-height: 100vh;
}

.landing-header {
    background-color: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-nav a {
    margin-left: 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--transition-fast);
}

.landing-nav a:hover {
    color: var(--ink);
}

.landing-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 0;
}

.hero-content {
    text-align: left;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.hero-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 2.25rem;
}

/* Glassmorphism Mockup Component */
.hero-mockup-wrapper {
    position: relative;
    width: 100%;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.07);
}

/* Floating interactive mockup cards */
.floating-card {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    padding: 0.85rem 1.15rem;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.floating-card-left {
    bottom: -15px;
    left: -20px;
    transform: rotate(-3deg);
}

.floating-card-right {
    top: -20px;
    right: -25px;
    transform: rotate(3deg);
}

.hero-mockup-wrapper:hover .floating-card-left {
    transform: rotate(-1deg) translate(-5px, -5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.hero-mockup-wrapper:hover .floating-card-right {
    transform: rotate(1deg) translate(5px, -5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.landing-section {
    padding: 5rem 1.5rem;
    border-top: 1px solid var(--border);
}

.landing-section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 2.75rem;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--ink);
}

.problem-grid-item, .solution-grid-item {
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-grid-item:hover, .solution-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.02);
}

.problem-grid-item {
    border-left: 3px solid var(--red);
}

.solution-grid-item {
    border-left: 3px solid var(--green);
}

.reason-card {
    border: 1px solid var(--border);
    background: var(--white);
    padding: 1.5rem;
    max-width: 380px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

/* Onboarding Wizard */
.onboarding-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--stone);
    padding-bottom: 0.75rem;
}

.onboarding-step {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.onboarding-step.active {
    color: var(--ink);
}

.onboarding-step.completed {
    color: var(--green);
}

/* Assets Library */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.asset-card {
    border: 1px solid var(--border);
    background-color: var(--white);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
}

.asset-preview {
    height: 70px;
    background-color: var(--canvas);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.asset-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.asset-meta {
    font-size: 0.7rem;
    color: var(--muted);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background-color: var(--ink);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    opacity: 0;
    transform: translateY(1rem);
    animation: toast-in 150ms ease forwards;
}

/* Mobile Sidebar Toggle Button (Hidden on Desktop) */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ink);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

/* Responsive Overrides */
@media (max-width: 850px) {
    .mobile-nav-toggle {
        display: block;
    }
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 1050;
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .app-content {
        margin-left: 0;
    }
    .top-bar {
        padding: 0.75rem 1rem;
    }
    .main-body {
        padding: 1.5rem 1rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    .calendar-cell {
        min-height: auto;
    }
    
    /* Hero layout mobile collapsing */
    .landing-hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 0;
    }
    .hero-content {
        text-align: center;
    }
    .hero-content h1 {
        font-size: 2.25rem;
    }
    .hero-content p {
        margin-bottom: 1.5rem;
    }
    .hero-trust-list {
        align-items: center;
        width: 100%;
        margin-top: 1.25rem;
    }
    .floating-card {
        display: none !important; /* Hide absolute panels on tablet/mobile */
    }
}

@media (max-width: 768px) {
    /* Clean up landing header navigation to prevent overflow wrapping */
    .landing-nav a:not(.btn):not([href*="login"]) {
        display: none;
    }
    .landing-header {
        padding: 0.75rem 1rem;
    }
    .landing-section {
        padding: 2.5rem 1rem;
    }
    .landing-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}
