/*
 * WantSEO Board - Main Stylesheet
 * v1.0.0
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --light-blue: #0088CE;
    --medium-blue: #0C54A0;
    --dark-blue: #244082;
    --dark-theme: #213356;
    --light-blue-theme: #2FAFFB;
    --lightest-blue: #D9F2FF;
    --bright-green: #92FE65;

    /* Dark mode palette */
    --bg-body: #0c1520;
    --bg-primary: #101d2c;
    --bg-secondary: #152233;
    --bg-card: #192a3e;
    --bg-elevated: #1e3148;
    --bg-hover: #1c3044;
    --bg-input: #0e1a28;

    /* Text */
    --text-primary: #e4edf5;
    --text-secondary: #7e97b0;
    --text-tertiary: #506578;
    --text-inverse: #0c1520;

    /* Borders */
    --border-primary: #1e3348;
    --border-secondary: #263d55;
    --border-focus: var(--light-blue-theme);

    /* Status */
    --color-success: #92FE65;
    --color-warning: #f5a623;
    --color-danger: #ef4444;
    --color-info: var(--light-blue-theme);

    /* Priority colors */
    --priority-low: #3B82F6;
    --priority-medium: #F59E0B;
    --priority-high: #F97316;
    --priority-urgent: #EF4444;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.4);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* Sidebar */
    --sidebar-width: 260px;
    --header-height: 56px;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--light-blue-theme); text-decoration: none; }
a:hover { color: var(--lightest-blue); }

img { max-width: 100%; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-secondary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

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

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-height);
}

.sidebar-logo {
    height: 26px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    padding: 0 8px;
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(47, 175, 251, 0.12);
    color: var(--light-blue-theme);
}

.sidebar-link .icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.sidebar-link.active .icon { opacity: 1; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-primary);
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== HEADER ========== */
.top-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title {
    font-size: 16px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}

.header-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: var(--color-danger);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* User avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--light-blue-theme), var(--medium-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

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

.user-avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.user-avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.user-avatar.xl { width: 64px; height: 64px; font-size: 20px; }

/* ========== PAGE CONTENT ========== */
.page-content {
    padding: 24px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 2px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--light-blue-theme), var(--light-blue));
    color: white;
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(47, 175, 251, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-success {
    background: linear-gradient(135deg, var(--bright-green), #60d840);
    color: var(--text-inverse);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; height: 32px; padding: 0; }

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(47, 175, 251, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237e97b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--light-blue-theme);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ========== CARDS (UI Cards) ========== */
.ui-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.ui-card-title {
    font-size: 15px;
    font-weight: 700;
}

/* ========== BOARD GRID ========== */
.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.board-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.board-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--light-blue-theme), var(--medium-blue));
}

.board-card:hover {
    border-color: var(--border-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.board-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.board-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.board-card-members {
    display: flex;
    align-items: center;
}

.board-card-members .user-avatar {
    margin-left: -6px;
    border: 2px solid var(--bg-card);
}

.board-card-members .user-avatar:first-child {
    margin-left: 0;
}

.board-star {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 16px;
    padding: 4px;
    transition: color var(--transition-fast);
}

.board-star:hover,
.board-star.active {
    color: #f5a623;
}

/* Create board card */
.board-card-create {
    background: transparent;
    border: 2px dashed var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    min-height: 140px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.board-card-create:hover {
    border-color: var(--light-blue-theme);
    color: var(--light-blue-theme);
    background: rgba(47, 175, 251, 0.05);
}

/* ========== KANBAN BOARD ========== */
.board-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
}

.board-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.board-name-input {
    font-size: 16px;
    font-weight: 700;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.board-name-input:focus {
    outline: none;
    background: var(--bg-input);
}

.board-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.filter-btn.active {
    background: rgba(47, 175, 251, 0.12);
    border-color: rgba(47, 175, 251, 0.3);
    color: var(--light-blue-theme);
}

/* Kanban columns */
.kanban-container {
    flex: 1;
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    overflow-x: auto;
    align-items: flex-start;
}

.kanban-list {
    width: 280px;
    min-width: 280px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-height) - 100px);
}

.kanban-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 8px;
}

.kanban-list-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-list-count {
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.kanban-list-menu {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.kanban-list-menu:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Kanban cards */
.kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 20px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.kanban-card:hover {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-sm);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.kanban-card-labels {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.kanban-card-label {
    height: 6px;
    border-radius: 3px;
    min-width: 32px;
}

.kanban-card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.kanban-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.card-badge svg { width: 12px; height: 12px; }

.card-badge.due-soon { color: var(--color-warning); }
.card-badge.overdue { color: var(--color-danger); }
.card-badge.complete { color: var(--color-success); }

.kanban-card-members {
    display: flex;
    align-items: center;
}

.kanban-card-members .user-avatar {
    width: 22px;
    height: 22px;
    font-size: 9px;
    margin-left: -4px;
    border: 2px solid var(--bg-card);
}

.kanban-card-members .user-avatar:first-child { margin-left: 0; }

/* Priority indicator */
.kanban-card-priority {
    width: 3px;
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    border-radius: 0 3px 3px 0;
}

.priority-low { background: var(--priority-low); }
.priority-medium { background: var(--priority-medium); }
.priority-high { background: var(--priority-high); }
.priority-urgent { background: var(--priority-urgent); }

/* Cover image */
.kanban-card-cover {
    margin: -10px -12px 8px;
    height: 100px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}

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

/* Add card */
.kanban-add-card {
    padding: 8px;
}

.add-card-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.add-card-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.add-card-form {
    display: none;
}

.add-card-form.active {
    display: block;
}

.add-card-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-focus);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    resize: none;
    min-height: 60px;
    margin-bottom: 8px;
}

.add-card-input:focus { outline: none; }

.add-card-actions {
    display: flex;
    gap: 8px;
}

/* Add list */
.kanban-add-list {
    width: 280px;
    min-width: 280px;
}

.add-list-btn {
    width: 100%;
    padding: 12px;
    background: rgba(47, 175, 251, 0.08);
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.add-list-btn:hover {
    border-color: var(--light-blue-theme);
    color: var(--light-blue-theme);
    background: rgba(47, 175, 251, 0.1);
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-sm { max-width: 440px; }
.modal-lg { max-width: 900px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-danger);
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
}

/* ========== CARD DETAIL MODAL ========== */
.card-detail {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 24px;
}

.card-detail-main { min-width: 0; }
.card-detail-sidebar { }

.card-detail-section {
    margin-bottom: 24px;
}

.card-detail-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-description {
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    min-height: 80px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    transition: border-color var(--transition-fast);
}

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

.card-description.has-content {
    color: var(--text-primary);
}

/* Checklist */
.checklist-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.checklist-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.checklist-progress-fill {
    height: 100%;
    background: var(--bright-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.checklist-progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    min-width: 30px;
    text-align: right;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
}

.checklist-item input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--bright-green);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checklist-item-text {
    flex: 1;
    font-size: 13px;
}

.checklist-item.completed .checklist-item-text {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

/* Comment */
.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 700;
}

.comment-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.comment-content {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.comment-action-btn {
    font-size: 11px;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
}

.comment-action-btn:hover { color: var(--light-blue-theme); }

/* Sidebar actions */
.card-sidebar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all var(--transition-fast);
}

.card-sidebar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.card-sidebar-btn svg {
    width: 14px;
    height: 14px;
}

/* ========== DROPDOWN MENU ========== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 6px;
    z-index: 200;
    display: none;
}

.dropdown-menu.active { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item.danger {
    color: var(--color-danger);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 6px 0;
}

/* ========== LABELS ========== */
.label-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* ========== TABLE ========== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: var(--bg-elevated);
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    font-size: 13px;
}

.data-table tr:hover td {
    background: rgba(47, 175, 251, 0.03);
}

/* ========== STATUS BADGE ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(146, 254, 101, 0.12);
    color: var(--bright-green);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ========== NOTIFICATION PANEL ========== */
.notifications-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-primary);
    z-index: 500;
    transition: right var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.notifications-panel.open { right: 0; }

.notification-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notification-item:hover { background: var(--bg-hover); }
.notification-item.unread { background: rgba(47, 175, 251, 0.05); }

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 12px;
    color: var(--text-secondary);
}

.notification-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 13px;
    margin-bottom: 20px;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-danger); }
.toast.info { border-left: 3px solid var(--color-info); }

/* ========== LOADING ========== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--light-blue-theme);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 21, 32, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* ========== DRAG STATES ========== */
.drag-over {
    background: rgba(47, 175, 251, 0.08) !important;
    border-color: var(--light-blue-theme) !important;
}

.drag-ghost {
    opacity: 0.4;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .card-detail {
        grid-template-columns: 1fr;
    }
    .kanban-list {
        width: 260px;
        min-width: 260px;
    }
    .page-content {
        padding: 16px;
    }
    .boards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(47, 175, 251, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(12, 84, 160, 0.06) 0%, transparent 50%);
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, -2%); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 36px;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 20px;
    font-weight: 800;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

/* ========== ADMIN PAGES ========== */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 18px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 2px;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 24px;
}

.tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab:hover { color: var(--text-primary); }
.tab.active {
    color: var(--light-blue-theme);
    border-bottom-color: var(--light-blue-theme);
}

/* ========== SEARCH ========== */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

/* ========== POPOVER ========== */
.popover {
    position: absolute;
    background: var(--bg-elevated);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    padding: 12px;
    min-width: 240px;
    display: none;
}

.popover.active { display: block; }

.popover-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-primary);
}

/* Update dropzone */
.update-dropzone {
    border: 2px dashed var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.update-dropzone:hover,
.update-dropzone.dragover {
    border-color: var(--light-blue-theme);
    background: rgba(47, 175, 251, 0.05);
}

.update-dropzone-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.update-dropzone-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.update-dropzone-hint {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ============================================================
   SIDEBAR FOOTER — STATIC USER SECTION
   Avatar + name on left, icon buttons on right. No dropdown.
   ============================================================ */
.sf-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 10px;
}

.sf-user-details {
    flex: 1;
    min-width: 0;
}

.sf-user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sf-user-email {
    font-size: 10px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-user-actions {
    display: flex;
    gap: 4px;
    padding: 0 4px;
}

.sf-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sf-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sf-action-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

/* Header board logo (shown on board page) */
.header-board-logo {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px;
    max-height: 28px;
    min-width: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.header-board-logo-fallback {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
}
