/* ===== PAIRFORM PORTAL - DESIGN SYSTEM ===== */
/* SaaS-style Enterprise Portal */

:root {
    /* === PairForm Colors === */
    --accent-primary: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-light: rgba(37, 99, 235, 0.1);
    --accent-glow: rgba(37, 99, 235, 0.2);

    /* Backgrounds */
    --bg-page: #F8FAFC;
    --bg-sidebar: #0F172A;
    --bg-card: #FFFFFF;
    --bg-input: #F1F5F9;
    --bg-hover: #E2E8F0;

    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-inverse: #FFFFFF;

    /* Status Colors */
    --status-success: #10B981;
    --status-warning: #F59E0B;
    --status-error: #EF4444;
    --status-info: #3B82F6;

    /* Kanban Scope-Guarding Columns */
    --kanban-active: #DBEAFE;
    /* Blue - In Scope Active */
    --kanban-uat: #FEF3C7;
    /* Yellow - UAT & Bugfixing */
    --kanban-waiting: #FEE2E2;
    /* Red/Pink - Waiting on Client */
    --kanban-ideas: #E0E7FF;
    /* Purple - Out of Scope Ideas */

    /* Typography */
    --font-heading: 'Outfit', -apple-system, system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;

    /* Spacing - Compact Mode */
    --space-xs: 2px;
    --space-sm: 6px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 32px;

    /* Borders & Shadows */
    --border-color: #E2E8F0;
    --border-radius: 6px;
    --border-radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Sidebar */
    /* Sidebar */
    --sidebar-width: 240px;

    /* === Glassmorphism System === */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    --glass-blur: blur(12px);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    --glass-dark-bg: rgba(15, 23, 42, 0.7);
    --glass-dark-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-dark-blur: blur(16px);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-panel-dark {
    background: var(--glass-dark-bg);
    backdrop-filter: var(--glass-dark-blur);
    -webkit-backdrop-filter: var(--glass-dark-blur);
    border: var(--glass-dark-border);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 1.5vw, 16px);
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.375rem;
}

h3 {
    font-size: 1.125rem;
}

h4 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-page) 0%, #E2E8F0 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: var(--space-xl);
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-logo {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
}

.login-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    background: var(--bg-input);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-error {
    color: var(--status-error);
    font-size: 0.8125rem;
    margin-top: var(--space-xs);
    display: none;
}

.form-error.visible {
    display: block;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--status-error);
    color: var(--text-inverse);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== LAYOUT: SIDEBAR + MAIN ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    /* CRITICAL: Use variable for responsive width */
    background: var(--glass-dark-bg);
    backdrop-filter: var(--glass-dark-blur);
    -webkit-backdrop-filter: var(--glass-dark-blur);
    border-right: var(--glass-dark-border);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease, width 0.3s ease;
    /* Smooth transitions */
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-inverse);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem;
}

.sidebar-brand img {
    width: 32px;
    height: 32px;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
    display: flex;
    flex-direction: column;
}

.nav-section {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-lg);
}

.nav-section-title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    padding: 0 var(--space-sm);
    margin-bottom: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
}

.nav-item.active {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

.nav-icon {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.nav-spacer {
    flex: 1;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-light);
}

.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: var(--space-sm);
    font-size: 1.125rem;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: var(--status-error);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    /* Smooth responsive transitions */
}

.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
}

.topbar-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.page-content {
    padding: var(--space-xl);
}

/* ===== PROJECT HEADER ===== */
/* ===== PROJECT HEADER ===== */
.project-header {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* ... content ... */

.project-info h1 {
    font-size: 1.5rem;
    /* Reduced from 1.75rem */
    margin-bottom: var(--space-xs);
}

.project-meta {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

/* ... item ... */

.status-badge {
    padding: 4px 10px;
    /* Reduced padding */
    font-size: 0.75rem;
}

.status-badge.active {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-success);
}

/* ===== KANBAN BOARD ===== */
.kanban-board {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-md);
}

.kanban-column {
    flex: 1 0 220px;
    /* Fluid grow, don't shrink below 220px */
    max-width: 400px;
    /* Don't get too wide on large screens */
    background: var(--bg-input);
    border-radius: var(--border-radius-lg);
    padding: var(--space-md);
    min-height: 400px;
    transition: flex 0.2s ease, max-width 0.2s ease;
}

/* On ultra-wide screens, let them spread more evenly */
@media (min-width: 1600px) {
    .kanban-column {
        max-width: none;
    }
}

.kanban-column.active {
    background: var(--kanban-active);
}

.kanban-column.uat {
    background: var(--kanban-uat);
}

.kanban-column.waiting {
    background: var(--kanban-waiting);
}

.kanban-column.ideas {
    background: var(--kanban-ideas);
    border: 2px dashed rgba(139, 92, 246, 0.3);
}

/* Out-of-scope column styling */
.kanban-column.ideas .column-header {
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

.kanban-column.ideas .column-title {
    color: #6D28D9;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.column-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.column-count {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 100px;
}

.kanban-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 10px;
    /* Compact padding */
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: default;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
}

.kanban-card.draggable {
    cursor: grab;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.card-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.card-progress {
    margin-top: var(--space-sm);
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
}

.card-progress-bar {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.add-task-btn {
    width: 100%;
    padding: var(--space-sm);
    background: transparent;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: var(--space-sm);
}

.add-task-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
}

.dashboard-main {
    min-width: 0;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ===== PANELS ===== */
.panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.panel-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.panel-body {
    padding: var(--space-lg);
}

/* Status Updates */
.updates-list {
    display: flex;
    flex-direction: column;
}

.update-item {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.update-item:last-child {
    border-bottom: none;
}

.update-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.update-content {
    flex: 1;
}

.update-text {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.update-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* KPI Stats */
.kpi-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.kpi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.kpi-item:last-child {
    border-bottom: none;
}

.kpi-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.kpi-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Support Block */
.support-block {
    background: var(--bg-input);
    border-radius: var(--border-radius);
    padding: var(--space-md);
}

.support-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
}

.support-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.support-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.support-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.support-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--status-success);
    border-radius: 50%;
}

/* ===== ADMIN TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 8px 12px;
    /* Compact padding */
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    /* Prevent awkward wrapping */
}

.data-table {
    font-size: 0.8125rem;
    /* Smaller font for density */
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--space-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.data-table th {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg-input);
    position: sticky;
    top: 0;
}

.data-table td {
    font-size: 0.8125rem;
}

.data-table tr:hover td {
    background: var(--bg-input);
}

.table-actions {
    display: flex;
    gap: var(--space-xs);
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ===== GUARD-RAIL MODALS ===== */
.modal-compact {
    max-width: 520px;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* Request Type Grid */
.request-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.request-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.request-type-card:hover {
    border-color: var(--accent-primary);
    background: var(--accent-light);
    transform: translateY(-2px);
}

.request-type-icon {
    font-size: 2.5rem;
}

.request-type-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.request-type-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.request-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: var(--space-xs);
}

.request-type-badge.in-scope {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.request-type-badge.out-scope {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

/* Scope Block Modal */
.scope-block-header {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.scope-block-header .modal-title {
    color: #92400E;
}

.scope-block-content {
    text-align: center;
}

.scope-block-content p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-calendly {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    margin: var(--space-lg) 0;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}

.btn-calendly:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.scope-block-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.scope-block-divider::before,
.scope-block-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Idea Notice */
.idea-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-lg);
    border-left: 4px solid #6366F1;
}

.idea-notice-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.idea-notice p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ===== PROCESS DEFINITION PANEL ===== */
.process-definition-panel {
    border-left: 4px solid var(--accent-primary);
    margin-bottom: var(--space-lg);
}

.process-definition-panel .panel-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
}

.process-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.process-document-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-input);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    margin-bottom: var(--space-md);
}

.process-document-link:hover {
    background: var(--accent-light);
    border-color: var(--accent-primary);
}

.process-document-link .doc-icon {
    font-size: 1.5rem;
}

.process-document-link .doc-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.process-document-link .doc-arrow {
    color: var(--accent-primary);
    font-weight: bold;
}

/* Scope Status Badge */
.scope-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.scope-status.unlocked {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.scope-status-icon {
    font-size: 0.875rem;
}

/* Scope Meta */
.scope-meta {
    display: flex;
    gap: var(--space-xl);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.scope-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
}

.scope-meta-item .meta-label {
    color: var(--text-muted);
}

.scope-meta-item strong {
    color: var(--text-primary);
}

/* Scope Freeze Toggle */
.scope-freeze-toggle {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--border-color);
}


/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: var(--status-success);
}

.text-error {
    color: var(--status-error);
}

.text-muted {
    color: var(--text-muted);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-sidebar .panel {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
        width: 260px;
    }

    .main-content {
        margin-left: 0;
    }

    .kanban-column {
        flex: 0 0 260px;
    }

    .project-header-content {
        flex-direction: column;
    }

    .project-meta {
        flex-wrap: wrap;
        gap: var(--space-md);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ===== ROI COUNTER ===== */
.roi-counter-panel {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1D4ED8 100%);
    border: none;
    color: var(--text-inverse);
}

.roi-counter-panel .panel-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.roi-counter-panel .panel-title {
    color: var(--text-inverse);
}

.roi-counter-display {
    text-align: center;
    padding: var(--space-md) 0;
}

.roi-counter-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    animation: countUp 0.5s ease-out;
}

.roi-counter-label {
    display: block;
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: var(--space-xs);
}

.roi-counter-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.roi-stat {
    flex: 1;
    text-align: center;
}

.roi-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
}

.roi-stat-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PHASE INDICATOR ===== */
.phase-indicator {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.phase-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
}

.phase-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.phase-step.completed .phase-dot {
    background: var(--status-success);
    border-color: var(--status-success);
    color: white;
}

.phase-step.active .phase-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.phase-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.phase-step.completed .phase-label,
.phase-step.active .phase-label {
    color: var(--text-primary);
    font-weight: 500;
}

.phase-connector {
    width: 2px;
    height: 16px;
    background: var(--border-color);
    margin-left: 15px;
}

.phase-connector.completed {
    background: var(--status-success);
}

/* ===== UPSELL PANEL ===== */
.upsell-panel {
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.upsell-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.upsell-panel h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.upsell-btn {
    width: 100%;
    background: var(--status-success);
    border: none;
}

.upsell-btn:hover {
    background: #059669;
}

/* ===== PREMIUM DASHBOARD V2 ===== */

/* Premium Topbar */
.premium-topbar {
    background: linear-gradient(135deg, var(--bg-card) 0%, #F0F4F8 100%);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
}

.premium-topbar .topbar-left {
    flex: 1;
}

.premium-topbar .topbar-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.premium-topbar .topbar-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.project-select {
    min-width: 220px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Tab Navigation */
.dashboard-tabs {
    display: flex;
    gap: var(--space-sm);
    background: var(--bg-card);
    padding: var(--space-sm);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.tab-btn.active {
    color: white;
    background: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tab-icon {
    font-size: 1.1rem;
}

/* Fluid Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    /* Fluid Main + Fixed Sidebar */
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Fluid Stat Cards */
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--border-radius-lg);
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card.gradient-blue {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}

.stat-card.gradient-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.stat-card.gradient-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.stat-card.gradient-orange {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Dashboard Grid V2 */
.dashboard-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-xl);
}

.main-column,
.side-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Project Card */
.project-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.project-card h2 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.project-meta-inline {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.meta-badge {
    background: var(--accent-light);
    color: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
}

.meta-divider {
    color: var(--text-light);
}

/* Horizontal Phase Progress Bar */
.phase-progress-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: var(--space-md);
    background: var(--bg-input);
    border-radius: var(--border-radius);
}

.phase-step-h {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.phase-step-h span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--bg-page);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.7rem;
}

.phase-step-h.completed span {
    background: var(--status-success);
    border-color: var(--status-success);
    color: white;
}

.phase-step-h.active span {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.phase-step-h.completed,
.phase-step-h.active {
    color: var(--text-primary);
    font-weight: 500;
}

.phase-connector-h {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 var(--space-xs);
    min-width: 20px;
}

.phase-connector-h.completed {
    background: var(--status-success);
}

/* Kanban Panel */
.kanban-panel {
    flex: 1;
}

.kanban-body {
    padding: var(--space-md);
    overflow-x: auto;
}

/* KPI Panel V2 */
.kpi-panel .kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-md);
    text-align: center;
}

.kpi-panel .kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-input);
    border-radius: var(--border-radius);
    border-bottom: none;
}

.kpi-progress {
    position: relative;
    width: 60px;
    height: 60px;
}

.circular-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--bg-hover);
    stroke-width: 3;
}

.circle {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 3;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    from {
        stroke-dasharray: 0, 100;
    }
}

.kpi-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.kpi-value-lg {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Upsell Card V2 */
.upsell-card {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.upsell-content {
    padding: var(--space-md);
    text-align: center;
}

.upsell-badge {
    display: inline-block;
    background: var(--status-success);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.upsell-content h4 {
    margin-bottom: var(--space-xs);
}

.upsell-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.project-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-list-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.project-list-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: var(--border-radius);
}

.project-list-info {
    flex: 1;
}

.project-list-info h4 {
    margin-bottom: 4px;
}

.project-list-info p {
    font-size: 0.875rem;
    margin: 0;
}

.status-pill {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.active {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.status-pill.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-success);
}

/* Updates Timeline */
.updates-timeline {
    position: relative;
    padding-left: 30px;
}

.updates-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border: 3px solid var(--bg-page);
    border-radius: 50%;
}

.timeline-content {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: var(--space-xs);
}

.timeline-content h4 {
    margin-bottom: var(--space-xs);
}

.timeline-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Support Grid */
.support-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.support-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    text-align: center;
}

.support-card.highlight {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #1D4ED8 100%);
    color: white;
    border: none;
}

.support-card.highlight h4,
.support-card.highlight p,
.support-card.highlight span {
    color: white;
}

.support-card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.support-card h4 {
    margin-bottom: var(--space-xs);
}

.support-card p {
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.support-response {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sla-info {
    text-align: left;
    margin-top: var(--space-sm);
}

.sla-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sla-row:last-child {
    border-bottom: none;
}

/* Ticket Panel */
.ticket-panel {
    margin-top: var(--space-md);
}

.ticket-form .form-group {
    margin-bottom: var(--space-md);
}

.ticket-form textarea {
    resize: vertical;
}

/* ===== RESPONSIVE DESIGN SYSTEM ===== */

/* Fluid Typography */
html {
    font-size: clamp(14px, 1.5vw, 16px);
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .page-content {
        max-width: 1600px;
        margin: 0 auto;
    }

    .kanban-column {
        flex: 0 0 320px;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .kanban-column {
        flex: 0 0 260px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 280px;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) {
    :root {
        --sidebar-width: 220px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Fluid Dashboard Grid V2 (Secondary) */
    .dashboard-grid-v2 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-lg);
        margin-bottom: var(--space-xl);
    }

    .support-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .kanban-board {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: var(--space-lg);
    }

    .kanban-column {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    :root {
        --sidebar-width: 0px;
    }

    /* Hide sidebar on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Mobile menu overlay */
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-left: 0;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--bg-input);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        cursor: pointer;
        font-size: 1.25rem;
    }

    .topbar {
        padding: var(--space-sm) var(--space-md);
    }

    .page-content {
        padding: var(--space-md);
    }

    .project-header-content {
        flex-direction: column;
        gap: var(--space-md);
    }

    .project-meta {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .dashboard-sidebar {
        grid-template-columns: 1fr;
    }

    /* Phase progress horizontal scroll */
    .phase-progress-h {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .phase-progress-bar {
        min-width: 500px;
    }
}

/* Mobile (576px - 767px) */
@media (max-width: 767px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .dashboard-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        min-width: 100px;
        font-size: 0.8125rem;
        padding: 10px 12px;
    }

    .phase-progress-bar {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .kpi-panel .kpi-grid {
        grid-template-columns: 1fr;
    }

    /* Kanban cards full width */
    .kanban-column {
        flex: 0 0 calc(100vw - 32px);
        min-width: calc(100vw - 32px);
    }

    /* Modal full screen on mobile */
    .modal {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        margin: 12px;
    }

    .modal-compact {
        max-width: calc(100vw - 24px);
    }

    /* Request type cards stack */
    .request-type-grid {
        grid-template-columns: 1fr;
    }

    /* Process Definition */
    .scope-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* Stat cards */
    .stat-card {
        padding: var(--space-md);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Topbar compact */
    .topbar-title {
        font-size: 0.9375rem;
    }

    /* Button adjustments */
    .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* Form elements */
    .form-input {
        padding: 10px 14px;
        font-size: 1rem;
    }
}

/* Small Mobile (< 576px) */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }

    .page-content {
        padding: var(--space-sm);
    }

    .panel-header,
    .panel-body {
        padding: var(--space-md);
    }

    .project-header {
        padding: var(--space-md);
    }

    /* Hide long text on very small screens */
    .tab-btn span:not(.tab-icon) {
        display: none;
    }

    .tab-btn .tab-icon {
        margin-right: 0;
    }

    /* Kanban single column view */
    .kanban-board {
        flex-direction: column;
        overflow-x: visible;
    }

    .kanban-column {
        flex: 1 1 auto;
        width: 100%;
        min-width: 100%;
        min-height: auto;
    }

    /* Collapse empty columns */
    .kanban-column .kanban-cards:empty+.add-task-btn {
        display: none;
    }

    /* User info compact */
    .user-details {
        display: none;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .kanban-card {
        padding: var(--space-lg);
    }

    .nav-item {
        padding: 14px var(--space-md);
    }

    .btn {
        min-height: 44px;
    }

    /* Larger tap targets */
    .modal-close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Print styles */
@media print {

    .sidebar,
    .topbar,
    .mobile-menu-btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .kanban-board {
        flex-wrap: wrap;
    }

    .kanban-column {
        break-inside: avoid;
    }
}

/* ===== CUSTOM LANGUAGE SELECTOR ===== */
.translate-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Language Button */
.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-page);
    color: var(--text-primary);
}

.language-btn .globe-icon {
    font-size: 1.1rem;
}

.language-btn .current-lang {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.language-btn .dropdown-arrow {
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.translate-container.open .language-btn .dropdown-arrow {
    transform: rotate(180deg);
}

/* Language Dropdown Menu */
.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.translate-container.open .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.language-option:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
}

.language-option.active {
    background: var(--accent-light);
    color: var(--accent-primary);
    font-weight: 500;
}

.language-option .check-icon {
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.language-option.active .check-icon {
    opacity: 1;
}

/* Hide default Google Translate elements and prevent flicker */
#google_translate_element,
.goog-te-gadget,
.goog-te-banner-frame,
.goog-te-banner,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
}

body,
html {
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Specific fix for the Google Translate banner iframe */
iframe.goog-te-banner-frame {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}

/* Hide the "Original text" tooltip */
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
}

/* Hide the "Translate" blue bar at the top */
.goog-te-spinner-pos+.goog-te-spinner-pos {
    display: none !important;
}

/* Ensure no top margin is added to body/html */
body {
    top: 0 !important;
    position: static !important;
}

/* Hide the "original text" tooltip on hover */
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}