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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding: 24px 16px;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

/* Topbar — fixed bar with task title + due date */
.topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    z-index: 100;
}

.topbar-toggle {
    display: none;
}

.topbar-title {
    font-size: 17px;
    font-weight: 600;
    color: #111;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.topbar-due {
    font-size: 13px;
    color: #888;
    flex-shrink: 0;
}

.topbar-logout {
    margin-left: auto;
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
    flex-shrink: 0;
}

.topbar-logout:hover {
    color: #333;
}

.header {
    position: relative;
}

.header .topbar-logout {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #22c55e;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: #888;
    text-align: right;
}

/* Form fields */
.field-group {
    margin-bottom: 24px;
}

.field-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
}

.text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.field-tip {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

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

.text-input:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

/* Sensible field (password-like with toggle) */
.sensible-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.sensible-input-wrapper .text-input {
    flex: 1;
    min-width: 0;
}

.sensible-toggle {
    flex-shrink: 0;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.sensible-toggle:hover {
    border-color: #aaa;
    color: #333;
}

/* Admin sensible value (masked with toggle) */
.admin-sensible-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sensible-masked {
    font-size: 15px;
    color: #333;
    letter-spacing: 2px;
}

.admin-sensible-plain {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.admin-sensible-toggle {
    flex-shrink: 0;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.admin-sensible-toggle:hover {
    border-color: #aaa;
    color: #333;
}

/* File drop zone */
.file-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #3b82f6;
    background: #f0f7ff;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

.drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    margin-bottom: 4px;
}

.drop-text strong {
    color: #3b82f6;
}

.drop-text small {
    color: #aaa;
    font-size: 12px;
}

/* File list */
.file-list {
    margin-top: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
}

.file-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.file-thumb-icon {
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
}

.file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    text-decoration: none;
}

.file-name:hover {
    text-decoration: underline;
}

.file-status {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.file-status.uploading {
    background: #fef3c7;
    color: #92400e;
}

.file-status.done {
    background: #dcfce7;
    color: #166534;
}

.file-status.error {
    background: #fee;
    color: #991b1b;
}

.file-delete {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #999;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.file-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Save button */
.save-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.save-btn:hover {
    background: #2563eb;
}

.save-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.save-feedback {
    text-align: center;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

.save-feedback.success {
    color: #166534;
}

.save-feedback.error {
    color: #991b1b;
}

.autosave-status {
    font-size: 12px;
    text-align: right;
    min-height: 18px;
    margin-bottom: 4px;
    transition: opacity 0.3s ease;
}
.autosave-status:empty { opacity: 0; }
.autosave-status.saving { color: #6b7280; }
.autosave-status.saved { color: #166534; }
.autosave-status.error { color: #991b1b; }

/* Global progress — fixed bottom bar */
.global-progress {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.global-progress .progress-bar {
    width: 120px;
    height: 4px;
    margin-bottom: 0;
}

.global-progress .progress-text {
    font-size: 11px;
    color: #999;
}

/* Layout wrapper (multi-page) */
.layout-wrapper {
    margin-left: 240px;
    padding-top: 56px;
}

.layout-wrapper .container {
    max-width: 640px;
    margin: 0 auto;
}

.layout-wrapper .global-progress {
    left: calc(50% + 120px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 24px 16px;
    overflow-y: auto;
}

/* Sidebar branding */
.sidebar-brand {
    padding: 0 0 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sidebar-brand-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.sidebar-brand-initials {
    width: 100%;
    height: 80px;
    background: #e5e7eb;
    color: #374151;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    border-radius: 8px;
}

/* Sidebar header wrapper */
.sidebar-header {
    display: contents;
}

.sidebar-header-toggle {
    display: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.sidebar-item:hover {
    background: #f0f0f0;
    color: #333;
}

.sidebar-item.active {
    background: #eff6ff;
    color: #2563eb;
}

.sidebar-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-progress {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    margin-left: 8px;
}

.sidebar-progress.complete {
    color: #16a34a;
}

/* Page transition */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page visibility */
.form-page {
    display: none;
}

.form-page.active {
    display: block;
    animation: pageFadeIn 0.2s ease;
}

.sidebar-toggle-icon,
.sidebar-toggle-icon::before,
.sidebar-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: #555;
    border-radius: 1px;
    position: relative;
}

.sidebar-toggle-icon::before,
.sidebar-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
}

.sidebar-toggle-icon::before {
    top: -6px;
}

.sidebar-toggle-icon::after {
    top: 6px;
}

/* Sidebar backdrop (mobile only) */
.sidebar-backdrop {
    display: none;
}

/* Login page */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 40px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.landing-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-card .text-input {
    margin-bottom: 12px;
}

.login-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    flex-shrink: 0;
}

.status-badge.approved {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.status-badge.changes-requested {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.status-badge.in-review {
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.status-badge.completed {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.status-badge.not-started {
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

/* Field label row (client) */
.field-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.field-label-row label {
    margin-bottom: 0;
}

/* Field suggestion (client) */
.field-suggestion {
    margin-top: 8px;
    padding: 10px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.field-suggestion-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
}

.field-suggestion-text {
    font-size: 14px;
    color: #1e3a5f;
    margin-top: 2px;
    line-height: 1.5;
}

/* Field suggestion justification (client side) */
.field-suggestion-justification {
    font-size: 13px;
    font-style: italic;
    color: #64748b;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #bfdbfe;
    line-height: 1.5;
}

.field-suggestion-accept {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.field-suggestion-accept:hover {
    background: #2563eb;
}

.field-suggestion-accept:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Field complete action */
.field-complete-action {
    margin-top: 8px;
}

.field-complete-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.field-complete-btn:hover {
    border-color: #aaa;
    color: #333;
}

.field-complete-btn.completed {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

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

/* Admin comment in client view */
.admin-comment {
    margin-top: 8px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.admin-comment-label {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}

.admin-comment-text {
    font-size: 14px;
    color: #78350f;
    margin-top: 2px;
    line-height: 1.5;
}

/* Admin view */
.admin-field-group {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.admin-field-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-field-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.admin-field-header label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

/* Kept for backward compat; admin now uses .status-badge.in-review */
.review-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
}

.admin-field-value {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.empty-value {
    color: #aaa;
    font-style: italic;
    font-size: 14px;
}

/* Admin review editor */
.admin-review-editor {
    margin-top: 12px;
}

.admin-review-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.admin-status-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.admin-status-btn:hover {
    border-color: #aaa;
    color: #333;
}

.admin-status-btn.active.admin-status-approve {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.admin-status-btn.active.admin-status-changes {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}

/* Admin editor toggle */
.admin-review-toggle {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: auto;
}

.admin-review-toggle:hover {
    border-color: #aaa;
    color: #333;
}

/* Admin review details (collapsible) */
.admin-review-details {
    display: none;
}

.admin-review-details.active {
    display: block;
}

/* Admin suggestion editor */
.admin-suggestion-editor {
    margin-bottom: 8px;
}

.admin-suggestion-editor label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #888;
    margin-bottom: 4px;
}

.admin-suggestion-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}


.admin-suggestion-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

/* Admin comment editor (inside review editor) */
.admin-comment-editor {
    margin-bottom: 8px;
}

.admin-comment-editor label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #888;
    margin-bottom: 4px;
}

.admin-comment-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-comment-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

/* Admin review submit */
.admin-review-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.admin-review-save {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-review-save:hover {
    background: #2563eb;
}

.admin-review-save:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.admin-review-feedback {
    font-size: 12px;
    min-height: 16px;
}

.admin-review-feedback.success {
    color: #166534;
}

.admin-review-feedback.error {
    color: #991b1b;
}

/* Onboarding overlay */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.onboarding-overlay.hidden {
    display: none;
}

.onboarding-container {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.onboarding-slide {
    display: none;
}

.onboarding-slide.active {
    display: block;
    animation: pageFadeIn 0.2s ease;
}

.onboarding-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.onboarding-slide h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin-bottom: 8px;
}

.onboarding-slide p {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
}

.onboarding-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 20px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.onboarding-dot.active {
    background: #3b82f6;
    transform: scale(1.25);
}

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

.onboarding-skip {
    background: none;
    border: none;
    font-size: 14px;
    font-family: inherit;
    color: #888;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.15s;
}

.onboarding-skip:hover {
    color: #555;
}

.onboarding-next {
    padding: 10px 24px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.onboarding-next:hover {
    background: #2563eb;
}

/* Dashboard welcome */
.dashboard-welcome {
    margin-bottom: 20px;
}

/* Dashboard assignee */
.dashboard-assignee {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin-bottom: 12px;
}

.dashboard-assignee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.dashboard-assignee-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-assignee-info {
    display: flex;
    flex-direction: column;
}

.dashboard-assignee-role {
    font-size: 12px;
    color: #888;
}

.dashboard-assignee-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Chat bubble (welcome message) */
.chat-bubble {
    background: #f3f4f6;
    border-radius: 2px 16px 16px 16px;
    padding: 10px 16px;
    margin-left: 52px;
    margin-bottom: 20px;
}

.chat-bubble p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #1f2937;
}

/* Dashboard styles */
.dashboard-heading {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}

.dashboard-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

/* Deadline banner (dashboard) */
.deadline-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 12px;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.deadline-banner-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}

.deadline-banner-text {
    flex: 1;
    min-width: 0;
}

.deadline-relaxed {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.deadline-attention {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.deadline-urgent {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.deadline-overdue {
    background: #fff1f2;
    color: #9f1239;
    border-color: #fecdd3;
}

.deadline-whatsapp {
    margin-left: auto;
    flex-shrink: 0;
    padding: 6px 14px;
    background: #25D366;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    white-space: nowrap;
    transition: background 0.15s;
}

.deadline-whatsapp:hover {
    background: #1da851;
}

/* Topbar deadline */
.topbar-deadline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    flex-shrink: 0;
    cursor: default;
}

.topbar-deadline-icon {
    font-size: 14px;
    line-height: 1;
}

.topbar-deadline-relaxed {
    color: #166534;
}

.topbar-deadline-attention {
    color: #92400e;
}

.topbar-deadline-urgent {
    color: #9a3412;
}

.topbar-deadline-overdue {
    color: #9f1239;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.dashboard-card {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dashboard-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dashboard-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.dashboard-card-pct {
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.dashboard-card-pct.complete {
    color: #16a34a;
}

.dashboard-card-bar {
    width: 100%;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.dashboard-card-fill {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.dashboard-card-fill.complete {
    background: #22c55e;
}

.dashboard-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-card-count {
    font-size: 12px;
    color: #888;
}

.dashboard-card-statuses {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.dashboard-status-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
}

.dashboard-status-tag.approved {
    color: #166534;
    background: #dcfce7;
}

.dashboard-status-tag.changes-requested {
    color: #92400e;
    background: #fef3c7;
}

.dashboard-status-tag.in-review {
    color: #2563eb;
    background: #eff6ff;
}

.dashboard-status-tag.completed {
    color: #166534;
    background: #dcfce7;
}

.dashboard-status-tag.not-started {
    color: #6b7280;
    background: #f3f4f6;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 12px 8px;
    }

    .container {
        padding: 20px 16px;
        border-radius: 8px;
    }

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

    .onboarding-container {
        padding: 28px 20px 24px;
    }

    .onboarding-icon {
        font-size: 36px;
    }

    .deadline-banner {
        padding: 10px 12px;
        font-size: 13px;
        gap: 8px;
    }
}

/* Mobile sidebar (≤768px) — topbar layout */
@media (max-width: 768px) {
    /* Sidebar becomes a fixed topbar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        height: auto;
        transform: none;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        padding: 0;
        overflow: visible;
        transition: none;
        z-index: 1000;
    }

    .sidebar.open {
        transform: none;
    }

    /* Header: logo + toggle inline */
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
    }

    .sidebar-header-toggle {
        display: flex;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    /* Brand in topbar: compact */
    .sidebar-brand {
        padding: 0;
        max-height: 40px;
        width: auto;
        flex-shrink: 1;
    }

    .sidebar-brand-logo {
        max-height: 40px;
        width: auto;
    }

    .sidebar-brand-initials {
        height: 40px;
        width: 40px;
        font-size: 16px;
    }

    /* Nav: hidden by default, expand with .open */
    .sidebar-nav {
        display: none;
        padding: 0 16px;
    }

    .sidebar.open .sidebar-nav {
        display: block;
        padding-bottom: 12px;
    }

    /* Topbar below sidebar-header on mobile */
    .topbar {
        left: 0;
        top: 60px;
        padding: 0 16px;
        height: 48px;
    }

    .topbar-toggle {
        display: none;
    }

    /* Content: margin-top instead of margin-left */
    .layout-wrapper {
        margin-left: 0;
        margin-top: 108px;
        padding-top: 0;
    }

    /* Backdrop positioned below topbar */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    .sidebar-backdrop.open {
        display: block;
        top: 60px;
    }

    .layout-wrapper .global-progress {
        left: 50%;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
    pointer-events: none;
}

.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
