/* Premium Modern Styling System for CWMS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Myanmar:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    --secondary: #7c3aed;
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --font-sans: 'Plus Jakarta Sans', 'Inter', 'Noto Sans Myanmar', 'Pyidaungsu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body, h1, h2, h3, h4, h5, h6, input, select, textarea, button, label {
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Sidebar Styling */
aside.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-bg);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand img {
    height: 36px;
    border-radius: var(--radius-sm);
}

.sidebar-brand span {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-menu li.active a, .sidebar-menu a:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.08);
}

.sidebar-menu li.active a {
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar-menu .menu-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    padding: 16px 16px 8px 16px;
    letter-spacing: 0;
}

.sidebar-user {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0,0,0,0.2);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 15px;
}

.sidebar-user-info {
    flex-grow: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Main Content Area */
main.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    transition: all 0.3s;
    min-width: 0;
}

/* Top Navbar styling */
header.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 81px;
    padding: 0 32px;
    margin: -32px -32px 32px -32px;
    border-bottom: 1px solid var(--border-color);
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0;
}

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

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Card Component */
.card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

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

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

.btn-secondary {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: #cbd5e1;
}

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

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }
.badge-info { background-color: var(--primary-light); color: var(--primary); }

/* Table styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.data-table th {
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0;
}

table.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}

table.data-table tr:last-child td {
    border-bottom: none;
}

/* Form Styles */
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* Grid helper */
.grid {
    display: grid;
    gap: 24px;
}

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    aside.sidebar {
        transform: translateX(-100%);
    }
    main.main-content {
        margin-left: 0;
        padding: 16px;
    }
    header.top-navbar {
        margin: -16px -16px 24px -16px !important;
        padding: 16px !important;
    }
}

/* Responsive Page Layout Grid Helpers */
.page-layout-grid {
    display: grid;
    gap: 24px;
    align-items: flex-start;
}

.layout-boost { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.layout-team { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.layout-settings { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr); }
.layout-profile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.layout-report-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.layout-details { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr); }

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .page-layout-grid {
        grid-template-columns: 1fr !important;
    }
}

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

/* Wanda Gradient Metrics Cards Styles */
.card-gradient-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}
.card-gradient-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}
.card-gradient-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}
.card-gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}

/* Background Bubbles Decorator */
.card-gradient-primary::after,
.card-gradient-info::after,
.card-gradient-success::after,
.card-gradient-warning::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    bottom: -40px;
    right: -40px;
    pointer-events: none;
    z-index: 1;
}

.card-gradient-primary::before,
.card-gradient-info::before,
.card-gradient-success::before,
.card-gradient-warning::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: 10px;
    right: 40px;
    pointer-events: none;
    z-index: 1;
}

.card-gradient-primary p, .card-gradient-primary h2, .card-gradient-primary span,
.card-gradient-info p, .card-gradient-info h2, .card-gradient-info span,
.card-gradient-success p, .card-gradient-success h2, .card-gradient-success span,
.card-gradient-warning p, .card-gradient-warning h2, .card-gradient-warning span {
    position: relative;
    z-index: 2;
}

.card-gradient-primary p, .card-gradient-info p, .card-gradient-success p, .card-gradient-warning p {
    opacity: 0.85;
}

/* Dashboard Command Center */
.dashboard-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-workspace-select {
    min-width: 180px;
    max-width: 260px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    padding: 0 34px 0 12px;
    outline: none;
}

.dashboard-workspace-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.dash-icon-button,
.dashboard-link-button,
.dashboard-table-action,
.dashboard-full-button {
    text-decoration: none;
}

.dash-icon-button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #334155;
    border: 1px solid var(--border-color);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dash-icon-button:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: var(--primary);
}

.dash-icon-button-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}

.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.94)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(15, 118, 110, 0.12));
    box-shadow: var(--shadow-sm);
}

.dashboard-hero-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.dashboard-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #0f766e;
    flex: 0 0 auto;
}

.dashboard-hero h2 {
    font-size: 32px;
    line-height: 1.16;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: 0;
}

.dashboard-hero p {
    margin: 0;
    color: #475569;
    font-size: 15px;
    max-width: 760px;
}

.dashboard-hero p strong {
    color: #0f172a;
    font-weight: 800;
}

.dashboard-hero-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-self: center;
}

.dashboard-hero-panel > div {
    min-height: 92px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.dashboard-hero-panel span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-hero-panel strong {
    color: #0f172a;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-metric-card {
    min-height: 132px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.dashboard-metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.dashboard-metric-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-metric-body span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.dashboard-metric-body strong {
    color: #0f172a;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 800;
}

.dashboard-metric-body small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.metric-blue .dashboard-metric-icon { background: #dbeafe; color: #2563eb; }
.metric-amber .dashboard-metric-icon { background: #fef3c7; color: #b45309; }
.metric-green .dashboard-metric-icon { background: #dcfce7; color: #15803d; }
.metric-teal .dashboard-metric-icon { background: #ccfbf1; color: #0f766e; }
.metric-rose .dashboard-metric-icon { background: #ffe4e6; color: #e11d48; }
.metric-slate .dashboard-metric-icon { background: #e2e8f0; color: #334155; }

.dashboard-grid-main,
.dashboard-grid-secondary,
.dashboard-grid-tertiary {
    display: grid;
    gap: 22px;
    align-items: stretch;
}

.dashboard-grid-main {
    grid-template-columns: minmax(0, 1.72fr) minmax(300px, 0.78fr);
}

.dashboard-grid-secondary {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
}

.dashboard-grid-tertiary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-panel {
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.dashboard-panel-wide,
.dashboard-panel-large {
    min-width: 0;
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-panel-header-tight {
    margin-bottom: 16px;
}

.dashboard-panel-header h3 {
    font-size: 17px;
    line-height: 1.25;
    color: #0f172a;
    font-weight: 800;
    margin: 2px 0 0;
    letter-spacing: 0;
}

.dashboard-section-kicker {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.dashboard-link-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    background: #ffffff;
    white-space: nowrap;
}

.dashboard-link-button:hover {
    color: var(--primary);
    border-color: #c7d2fe;
    background: #eef2ff;
}

.dashboard-chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr);
    gap: 16px;
}

.dashboard-chart-box {
    position: relative;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
    min-width: 0;
}

.dashboard-chart-box-large {
    height: 310px;
}

.dashboard-chart-box-small {
    height: 310px;
}

.dashboard-status-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.dashboard-status-item {
    min-height: 58px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--status-color);
    background: #ffffff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.dashboard-status-item span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-status-item strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
}

.dashboard-usage-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-usage-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-usage-row > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-usage-row strong {
    color: #0f172a;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-progress,
.dashboard-priority-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.dashboard-progress span,
.dashboard-priority-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.progress-green span { background: #16a34a; }
.progress-teal span { background: #0f766e; }
.progress-amber span { background: #d97706; }

.dashboard-full-button {
    width: 100%;
    min-height: 42px;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-full-button:hover {
    background: #1e293b;
}

.dashboard-table-wrap {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.dashboard-table th {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    text-align: left;
    padding: 0 12px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    font-size: 13px;
    vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.align-right {
    text-align: right !important;
}

.dashboard-title-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dashboard-title-cell strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-title-cell span {
    color: #64748b;
    font-size: 12px;
}

.dashboard-platform-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dashboard-platform-tags span,
.dashboard-muted-tag {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    border-radius: 8px;
    padding: 3px 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-muted-tag {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    max-width: 180px;
    min-height: 25px;
    border-radius: 8px;
    padding: 4px 9px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--status-color);
    color: var(--status-color);
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-table-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    background: #ffffff;
}

.dashboard-table-action:hover {
    color: var(--primary);
    border-color: #c7d2fe;
    background: #eef2ff;
}

.dashboard-count-pill {
    min-width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-queue-list,
.dashboard-schedule-list,
.dashboard-activity-list,
.dashboard-priority-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-queue-item,
.dashboard-schedule-item {
    text-decoration: none;
    color: inherit;
}

.dashboard-queue-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    background: #ffffff;
}

.dashboard-queue-item:hover,
.dashboard-schedule-item:hover {
    border-color: #c7d2fe;
    background: #f8fafc;
}

.dashboard-queue-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-queue-topline small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-queue-item strong,
.dashboard-schedule-item strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dashboard-queue-item > span,
.dashboard-schedule-item span,
.dashboard-activity-item span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.priority-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
}

.priority-high { background: #ffe4e6; color: #be123c; }
.priority-medium { background: #fef3c7; color: #92400e; }
.priority-low { background: #dcfce7; color: #166534; }

.dashboard-schedule-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--status-color);
    padding: 10px;
    background: #ffffff;
}

.dashboard-date-chip {
    width: 42px;
    height: 48px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dashboard-date-chip span {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-date-chip strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
}

.dashboard-priority-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-priority-row > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-priority-row strong {
    color: #0f172a;
}

.priority-row-high .dashboard-priority-bar span { background: #e11d48; }
.priority-row-medium .dashboard-priority-bar span { background: #d97706; }
.priority-row-low .dashboard-priority-bar span { background: #16a34a; }

.dashboard-mini-chart {
    height: 280px;
    margin-top: 18px;
    position: relative;
}

.dashboard-activity-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

.dashboard-activity-item:last-child {
    border-bottom: 0;
}

.dashboard-activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #ecfeff;
    color: #0e7490;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-activity-item strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-empty-state,
.dashboard-empty-cell {
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.dashboard-empty-state {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.dashboard-empty-state i {
    color: #94a3b8;
    font-size: 20px;
}

.dashboard-empty-cell {
    padding: 32px 12px !important;
}

@media (max-width: 1180px) {
    .dashboard-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-grid-main,
    .dashboard-grid-secondary,
    .dashboard-grid-tertiary {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    header.top-navbar {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 16px;
        height: auto !important;
        padding: 20px 32px !important;
    }

    .navbar-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .dashboard-top-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .dashboard-hero-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero h2 {
        font-size: 26px;
    }

    .dashboard-hero-panel {
        grid-template-columns: 1fr;
    }

    .dashboard-workspace-select {
        width: 100%;
        max-width: none;
    }

    .dashboard-chart-box-large,
    .dashboard-chart-box-small {
        height: 260px;
    }

    .dashboard-panel {
        padding: 16px;
    }

    .dashboard-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Workflow Kanban */
.workspace-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.kanban-page,
.content-detail-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
    max-width: 100%;
}

.kanban-command-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 0.82fr);
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.10));
    box-shadow: var(--shadow-sm);
}

.kanban-command-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.kanban-command-copy h2,
.content-detail-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 30px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: 0;
}

.kanban-command-copy p,
.content-detail-hero p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.kanban-command-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-self: center;
}

.kanban-command-stats div {
    min-height: 92px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.kanban-command-stats span,
.content-detail-stat-grid span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.kanban-command-stats strong,
.content-detail-stat-grid strong {
    color: #0f172a;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.kanban-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.kanban-filter-group {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.kanban-filter-group label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 190px;
}

.kanban-filter-group label span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.kanban-toolbar-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.kanban-toolbar-note i {
    color: #0f766e;
}

.kanban-board-shell {
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #eef2f7;
    padding: 16px;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.kanban-board-wrapper {
    width: 100%;
    max-width: 100%;
    min-height: 68vh;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.kanban-column {
    width: 318px;
    min-width: 318px;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    overflow: hidden;
    scroll-snap-align: start;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 4px solid var(--column-color);
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 14px 16px;
}

.kanban-column-header div {
    min-width: 0;
}

.kanban-column-header span {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-column-header small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.kanban-column .column-count-badge {
    min-width: 30px;
    height: 28px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.kanban-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    min-height: 140px;
    overflow-y: auto;
}

.kanban-card {
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kanban-card:hover {
    border-color: #c7d2fe;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.kanban-card.is-overdue {
    border-left: 4px solid var(--danger);
}

.kanban-card.is-locked {
    background: #fafafa;
}

.kanban-card.is-dragging {
    opacity: 0.58;
    transform: rotate(1deg);
}

.kanban-card-cover {
    width: 100%;
    height: 138px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.kanban-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kanban-card-cover span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    padding: 4px 7px;
    font-size: 10px;
    font-weight: 800;
}

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

.kanban-card-gallery img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.kanban-card-gallery span {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}

.kanban-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.kanban-card-title-row strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.36;
    font-weight: 800;
}

.kanban-card-title-row strong i {
    margin-right: 6px;
    color: #64748b;
}

.kanban-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--priority-color);
    flex: 0 0 auto;
    margin-top: 4px;
}

.kanban-card-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.kanban-card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 8px;
    padding: 3px 7px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 10px;
    font-weight: 800;
}

.kanban-card-tags span.muted {
    background: #f1f5f9;
    color: #64748b;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #edf2f7;
    padding-top: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.kanban-card-footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.kanban-card-footer .is-danger {
    color: var(--danger);
}

.kanban-empty-column {
    min-height: 120px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

/* Content Details */
.detail-back-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.detail-back-button:hover {
    color: var(--primary);
    border-color: #c7d2fe;
    background: #eef2ff;
}

.content-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(470px, 0.86fr);
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    border-left: 4px solid var(--status-color);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.content-detail-hero-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.content-detail-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.content-detail-kicker > span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--status-color);
}

.content-detail-kicker strong {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.priority-chip,
.lock-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    border-radius: 999px;
    padding: 4px 8px;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
}

.priority-chip.priority-high { background: #ffe4e6; color: #be123c; }
.priority-chip.priority-medium { background: #fef3c7; color: #92400e; }
.priority-chip.priority-low { background: #dcfce7; color: #166534; }
.lock-chip { background: #f1f5f9; color: #475569; }

.content-detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-self: center;
}

.content-detail-stat-grid > div {
    min-height: 86px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.content-detail-stat-grid strong {
    font-size: 15px;
}

.content-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.78fr);
    gap: 22px;
    align-items: start;
}

.detail-main-stack,
.detail-side-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.detail-panel {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.detail-accent-warning { border-top: 4px solid #f59e0b; }
.detail-accent-purple { border-top: 4px solid #7c3aed; }

.detail-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.detail-panel-header h3 {
    margin: 2px 0 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.detail-primary-action,
.detail-success-action,
.detail-danger-action {
    border: 0;
    border-radius: 8px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.detail-primary-action { background: var(--primary); }
.detail-success-action { width: 100%; background: #10b981; }
.detail-danger-action { width: 100%; background: #ef4444; }

.detail-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-form-grid.compact {
    gap: 10px;
}

.detail-field-full {
    min-width: 0;
}

.detail-large-textarea {
    min-height: 140px;
    resize: vertical;
}

.detail-platform-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-platform-grid label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 6px 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.detail-list-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 10px;
}

.detail-upload-zone {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.detail-upload-zone > i {
    color: var(--primary);
    font-size: 24px;
}

.detail-upload-zone > span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.detail-upload-zone input[type="file"] {
    display: none;
}

.detail-upload-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#upload-submit {
    display: none;
}

.detail-alert {
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}

.detail-alert-success {
    background: #dcfce7;
    color: #166534;
}

.detail-approval-box {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-subtitle {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.detail-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    font-size: 13px;
}

.comments-scroll {
    max-height: 350px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.compact-scroll {
    max-height: 240px;
}

.detail-muted-full-button {
    margin-top: 2px;
    background: #0f172a;
}

.detail-reply-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 8px;
    background: #eef2ff;
    padding: 8px 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 10px;
}

.detail-reply-banner strong {
    color: var(--primary);
}

.detail-reply-banner button {
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.detail-comment-field {
    position: relative;
    margin-bottom: 12px;
}

.detail-mention-dropdown {
    display: none;
    position: absolute;
    left: 0;
    bottom: 100%;
    width: 100%;
    max-height: 155px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.detail-comment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-comment-actions label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.detail-publish-form {
    margin-top: 14px;
}

@media (max-width: 1180px) {
    .kanban-command-panel,
    .content-detail-hero,
    .content-detail-layout {
        grid-template-columns: 1fr;
    }

    .content-detail-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .kanban-command-stats,
    .content-detail-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kanban-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .kanban-toolbar-note {
        white-space: normal;
    }

    .detail-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .kanban-command-panel,
    .content-detail-hero {
        padding: 18px;
    }

    .kanban-command-copy h2,
    .content-detail-hero h2 {
        font-size: 25px;
    }

    .kanban-command-stats,
    .content-detail-stat-grid {
        grid-template-columns: 1fr;
    }

    .kanban-filter-group,
    .kanban-filter-group label {
        width: 100%;
    }

    .kanban-column {
        width: 292px;
        min-width: 292px;
    }

    .detail-panel {
        padding: 16px;
    }

    .detail-panel-header,
    .detail-comment-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-inline-form {
        grid-template-columns: 1fr;
    }
}

/* Content Calendar */
.calendar-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.calendar-command-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(420px, 0.9fr);
    gap: 18px;
    align-items: stretch;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 46%, #ecfeff 100%);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.calendar-command-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.calendar-command-copy h2 {
    color: #0f172a;
    font-size: 31px;
    line-height: 1.18;
    margin: 8px 0 8px;
}

.calendar-command-copy p {
    max-width: 680px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.calendar-command-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-content: center;
}

.calendar-command-stats > div {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.calendar-command-stats span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.calendar-command-stats strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 27px;
    line-height: 1;
}

.calendar-toolbar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.calendar-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 12px;
}

.calendar-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.calendar-filter-grid label span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.calendar-control-row {
    display: grid;
    grid-template-columns: auto auto minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
}

.calendar-nav-group,
.calendar-view-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.calendar-nav-group button,
.calendar-view-button {
    min-height: 40px;
    border: 0;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.calendar-nav-group button:last-child,
.calendar-view-button:last-child {
    border-right: 0;
}

.calendar-nav-group button:hover,
.calendar-view-button:hover {
    background: #f8fafc;
}

.calendar-view-button.active {
    background: #4f46e5;
    color: #ffffff;
}

.calendar-bulk-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #f0f9ff;
    color: #075985;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

#calendar-month-year {
    justify-self: center;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

.calendar-board-panel,
.calendar-list-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.calendar-list-panel {
    display: none;
}

.calendar-grid-scroll {
    width: 100%;
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.calendar-table thead th {
    height: 46px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.calendar-cell {
    position: relative;
    height: 138px;
    vertical-align: top;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 10px;
    cursor: pointer;
    transition: background 0.16s ease;
}

.calendar-week-cell {
    height: 260px;
}

.calendar-cell:hover {
    background: #f8fafc;
}

.calendar-cell.is-muted {
    background: #f8fafc;
    color: #94a3b8;
}

.calendar-cell.is-today {
    background: #eef2ff;
    box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.calendar-cell-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.calendar-cell.is-today .calendar-cell-date {
    background: #4f46e5;
    color: #ffffff;
}

.calendar-cell-posts {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-height: 92px;
    overflow-y: auto;
    padding-right: 2px;
}

.calendar-week-cell .calendar-cell-posts {
    max-height: 205px;
}

.calendar-post-tag {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 54px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left: 5px solid var(--post-color, #64748b);
    border-radius: 8px;
    background: color-mix(in srgb, var(--post-color, #64748b) 13%, #ffffff);
    color: #0f172a;
    padding: 8px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.calendar-post-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.11);
}

.calendar-post-tag.is-overdue {
    border-color: #fecaca;
    border-left-color: #ef4444;
    background: #fff1f2;
}

.calendar-post-tag strong {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-post-tag strong i {
    margin-right: 5px;
    color: #475569;
}

.calendar-post-tag span {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 15px;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}

.calendar-list-table th,
.calendar-list-table td {
    white-space: normal;
}

.calendar-list-row {
    cursor: pointer;
}

.calendar-list-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.calendar-list-title strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.45;
}

.calendar-list-title strong i {
    margin-right: 6px;
    color: #475569;
}

.calendar-list-title span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.calendar-soft-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    max-width: 170px;
    border-radius: 8px;
    background: #ecfeff;
    color: #0f766e;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-empty-state {
    margin: 8px 0;
}

.calendar-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.58);
    padding: 22px;
}

.calendar-modal-card {
    width: min(720px, 100%);
    max-height: min(88vh, 860px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
}

.calendar-post-modal-card {
    width: min(860px, 100%);
}

.calendar-shift-modal-card {
    width: min(480px, 100%);
}

.calendar-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 18px 20px;
}

.calendar-modal-header h3 {
    color: #0f172a;
    font-size: 20px;
    line-height: 1.25;
}

.calendar-modal-form {
    padding: 20px;
}

.calendar-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.calendar-field-full {
    width: 100%;
}

.calendar-platform-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calendar-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 18px;
    padding-top: 16px;
}

.calendar-modal-actions > div {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.calendar-modal-actions.is-right {
    justify-content: flex-end;
}

.calendar-modal-copy {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    padding: 16px 20px 0;
}

@media (max-width: 1180px) {
    .calendar-command-panel {
        grid-template-columns: 1fr;
    }

    .calendar-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .calendar-command-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-control-row {
        grid-template-columns: 1fr;
    }

    #calendar-month-year {
        justify-self: start;
    }

    .calendar-nav-group,
    .calendar-view-switch,
    .calendar-bulk-button {
        width: 100%;
    }

    .calendar-nav-group button,
    .calendar-view-button {
        flex: 1;
    }

    .calendar-filter-grid,
    .calendar-modal-grid,
    .calendar-platform-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .calendar-command-panel,
    .calendar-toolbar {
        padding: 16px;
    }

    .calendar-command-copy h2 {
        font-size: 25px;
    }

    .calendar-command-stats {
        grid-template-columns: 1fr;
    }

    .calendar-modal {
        padding: 12px;
    }

    .calendar-modal-header,
    .calendar-modal-form {
        padding: 16px;
    }

    .calendar-modal-actions,
    .calendar-modal-actions > div {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-modal-actions .btn {
        width: 100%;
    }
}
