/* QPTEO Virtual Co-Design Board — Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Poppins:wght@900&display=swap');

:root {
    --primary: #040484;
    --primary-rgb: 4, 4, 132;
    --primary-light: rgba(4, 4, 132, 0.15);
    --primary-dark: #030366;
    --primary-hover: #1919d1;

    --bg-app: #f4f6f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-sidebar: #ffffff;
    --bg-input: #ffffff;

    --text-main: #051106;
    --text-muted: #7c7c7d;
    --text-bright: #ffffff;
    --text-dark: #051106;

    --border-color: #d1d5db;
    --border-light: rgba(0, 0, 0, 0.08);
    --border-focus: var(--primary);

    --success: #3fa34d;
    --success-bg: rgba(63, 163, 77, 0.15);
    --warning: #edac36;
    --warning-bg: rgba(237, 172, 54, 0.15);
    --danger: #c7383a;
    --danger-bg: rgba(199, 56, 58, 0.15);
    --info: #1919d1;
    --info-bg: rgba(25, 25, 209, 0.15);

    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.5), 0 1px 3px 1px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
    --shadow-glow: 0 0 20px rgba(var(--primary-rgb), 0.2);

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --sidebar-width: 260px;
    --navbar-height: 64px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Category colors palette */
    --cat-1: #8ab4f8;
    --cat-2: #81c995;
    --cat-3: #fdd663;
    --cat-4: #f28b82;
    --cat-5: #c58af9;
    --cat-6: #78d9ec;
    --cat-7: #fcad70;
    --cat-8: #ff8bcb;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection {
    background: rgba(var(--primary-rgb), 0.3);
    color: var(--text-bright);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   AUTHENTICATION PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 3s infinite;
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

.auth-body {
    padding: 32px;
}

.auth-body .form-group {
    margin-bottom: 20px;
}

.auth-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.auth-body .form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}
.auth-body .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    background: var(--bg-card);
}
.auth-body .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.auth-body .btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-dark);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}
.auth-body .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}
.auth-body .btn-primary:active {
    transform: translateY(0);
}

/* ============================================================
   SUBMIT PAGES
   ============================================================ */
.submit-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-app);
    padding: 20px;
}

.submit-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.submit-header {
    padding: 32px 24px;
    text-align: center;
    position: relative;
}

.submit-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.submit-header p {
    font-size: 0.9rem;
}

.submit-body {
    padding: 32px;
}

.submit-body .form-group {
    margin-bottom: 20px;
}

.submit-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

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

.sidebar {
    width: var(--sidebar-width);
    background: #040484;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base), width var(--transition-base);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: var(--navbar-height);
}
.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    flex-shrink: 0;
}
.sidebar-brand h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}
.sidebar-brand small {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}
.sidebar-nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px 4px;
    margin-top: 8px;
}
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 400;
    transition: all var(--transition-fast);
    cursor: pointer;
    margin-bottom: 2px;
}
.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}
.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--warning), #f1c40f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    flex-shrink: 0;
}
.sidebar-user-info {
    flex: 1;
    min-width: 0;
}
.sidebar-user-info .name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-info .role {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: capitalize;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

.main-header {
    height: var(--navbar-height);
    background: #edac36;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.main-header h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #051106;
}

.main-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.main-header .btn-ghost {
    color: rgba(5, 17, 6, 0.8);
}
.main-header .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #051106;
}

.main-body {
    padding: 28px 32px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 900;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: #1919d1;
    color: #ffffff;
    border-color: transparent;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
    color: #ffffff;
    background: #1414a8;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--text-bright);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #f1c40f);
    color: var(--text-dark);
}
.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(237, 172, 54, 0.2);
    color: var(--text-dark);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #5fb87a);
    color: var(--text-dark);
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(129, 201, 149, 0.2);
    color: var(--text-dark);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e07068);
    color: var(--text-dark);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(242, 139, 130, 0.2);
    color: var(--text-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 8px 12px;
}
.btn-ghost:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}
.card:hover {
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Stats cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity var(--transition-base);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card:hover::before {
    opacity: 1;
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================================
   IDEA CARDS (Board)
   ============================================================ */
.idea-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    position: relative;
    transition: all var(--transition-base);
    cursor: default;
}
.idea-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--cat-color, var(--primary));
}
.idea-card:hover {
    border-color: rgba(var(--primary-rgb), 0.15);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.idea-card .idea-content {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 10px;
}
.idea-card .idea-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.idea-card .idea-author {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.idea-card .idea-category-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    white-space: nowrap;
}
.idea-card .idea-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* New card animation */
.idea-card.entering {
    animation: cardEntrance 0.4s ease-out;
}
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Drag ghost */
.idea-card.sortable-ghost {
    opacity: 0.4;
    border-color: var(--primary);
}
.idea-card.sortable-chosen {
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   BOARD GRID
   ============================================================ */
.board-container {
    max-width: 1400px;
    margin: 0 auto;
}

.board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.board-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}
.filter-btn.active {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}
.filter-btn .badge {
    background: rgba(var(--primary-rgb), 0.25);
    color: var(--primary);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: var(--radius-xl);
    font-weight: 600;
}

.idea-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Board status bar */
.board-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.board-status .live-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--success);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================
   PRESENTATION VIEW
   ============================================================ */
.present-page {
    min-height: 100vh;
    background: #040484;
    padding: 40px;
}

.present-header {
    text-align: center;
    margin-bottom: 48px;
}
.present-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #edac36;
    margin-bottom: 8px;
}
.present-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}
.present-header .present-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
}
.present-header .present-stat {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.present-header .present-stat strong {
    color: #edac36;
    font-size: 1.3rem;
}

.present-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.present-card {
    background-color: var(--cat-color, #fdd663);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 2px 2px 18px 2px;
    padding: 28px 32px;
    position: relative;
    transition: all var(--transition-base);
}
.present-card::before {
    display: none;
}
.present-card::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 25px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1;
}
.present-card .idea-content {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}
.present-card .idea-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.present-card .idea-category-badge {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: var(--radius-xl);
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--text-main) !important;
}
.present-card.entering {
    animation: presentEntrance 0.6s ease-out;
}
@keyframes presentEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================================
   SUBMISSION PAGE
   ============================================================ */
.submit-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at 30% 50%, rgba(var(--primary-rgb), 0.06) 0%, transparent 50%),
                var(--bg-app);
    padding: 20px;
}

.submit-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.submit-header {
    background: #edac36;
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.submit-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
}
.submit-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    margin-bottom: 4px;
}
.submit-header p {
    font-size: 0.88rem;
    color: rgba(19, 19, 20, 0.65);
    position: relative;
}

.submit-body {
    padding: 32px;
}

.submit-body .form-group {
    margin-bottom: 20px;
}
.submit-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.submit-body label .required {
    color: var(--danger);
}
.submit-body .form-control,
.submit-body .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}
.submit-body .form-control:focus,
.submit-body .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    background: var(--bg-card);
}
.submit-body textarea.form-control {
    min-height: 120px;
    resize: vertical;
}
.submit-body .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 24 24' fill='none' stroke='%239aa0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.submit-body .char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.submit-body .char-counter.limit-near {
    color: var(--warning);
}
.submit-body .char-counter.limit-reached {
    color: var(--danger);
}

/* Success state */
.submit-success {
    text-align: center;
    padding: 48px 32px;
    animation: fadeInUp 0.4s ease-out;
}
.submit-success .check-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: var(--success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--success);
    animation: scaleIn 0.5s ease-out;
}
.submit-success h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.submit-success p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ============================================================
   SYNTHESIS VIEW
   ============================================================ */
.synthesis-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.synthesis-column {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    min-height: 200px;
}
.synthesis-column-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.synthesis-column-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cat-color, var(--primary));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.synthesis-column-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.synthesis-column-header .count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 10px;
    border-radius: var(--radius-xl);
}
.synthesis-column-body {
    padding: 12px;
    min-height: 100px;
}
.synthesis-column-body .idea-card {
    margin-bottom: 8px;
}
.synthesis-column-body .idea-card:last-child {
    margin-bottom: 0;
}

.synthesis-summary {
    margin-top: 24px;
}
.synthesis-summary textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    resize: vertical;
    transition: all var(--transition-fast);
}
.synthesis-summary textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: rgba(var(--primary-rgb), 0.03);
}
.data-table tbody td {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}
.badge-success {
    background: var(--success-bg);
    color: var(--success);
}
.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}
.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}
.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    display: inline-block;
}
.status-dot.active { background: var(--success); }
.status-dot.draft { background: var(--warning); }
.status-dot.closed { background: var(--text-muted); }
.status-dot.inactive { background: var(--danger); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    padding: 20px;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-base);
    pointer-events: auto; /* Override Bootstrap's pointer-events: none */
}
.modal-overlay.active .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}
.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
}
.modal-body .form-group {
    margin-bottom: 18px;
}
.modal-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.modal-body .form-control,
.modal-body .form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}
.modal-body .form-control:focus,
.modal-body .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

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

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}
.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    animation: toastTimer 4s linear forwards;
}
.toast.success::before { background: var(--success); }
.toast.error::before { background: var(--danger); }
.toast.warning::before { background: var(--warning); }

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
    font-size: 0.88rem;
    color: var(--text-main);
    flex: 1;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastTimer {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.form-switch input[type="checkbox"] {
    appearance: none;
    width: 44px;
    height: 24px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.form-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--transition-fast);
}
.form-switch input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.form-switch input[type="checkbox"]:checked::before {
    left: 22px;
    background: var(--text-dark);
}
.form-switch .switch-label {
    font-size: 0.88rem;
    color: var(--text-main);
}

/* ============================================================
   QR CODE DISPLAY
   ============================================================ */
.qr-display {
    text-align: center;
    padding: 20px;
}
.qr-display img {
    max-width: 200px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
}
.qr-display .qr-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 8px;
}
.qr-display .qr-url {
    font-size: 0.75rem;
    color: var(--primary);
    word-break: break-all;
    margin-top: 4px;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 16px;
}
.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 0.88rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}
.pagination .page-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.pagination .page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-dark);
    font-weight: 600;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ============================================================
   SIDEBAR COLLAPSED STATE (Desktop)
   ============================================================ */
@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar {
        width: 64px;
    }
    body.sidebar-collapsed .main-content {
        margin-left: 64px;
    }
    body.sidebar-collapsed .sidebar-brand {
        padding: 0;
    }
    body.sidebar-collapsed .sidebar-brand img {
        margin: 0 !important;
        max-height: 32px !important;
        transition: max-height var(--transition-fast);
    }
    body.sidebar-collapsed .sidebar-nav-label {
        display: none;
    }
    body.sidebar-collapsed .sidebar-nav-item span {
        display: none;
    }
    body.sidebar-collapsed .sidebar-nav-item {
        justify-content: center;
        padding: 12px 0;
    }
    body.sidebar-collapsed .sidebar-nav-item i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    body.sidebar-collapsed .sidebar-user-info {
        display: none;
    }
    body.sidebar-collapsed .sidebar-footer {
        padding: 16px 0;
        display: flex;
        justify-content: center;
    }
    body.sidebar-collapsed .sidebar-user {
        padding: 8px 0;
        justify-content: center;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .main-body {
        padding: 20px 16px;
    }
    .idea-grid {
        grid-template-columns: 1fr;
    }
    .present-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .present-header h1 {
        font-size: 1.6rem;
    }
    .synthesis-columns {
        grid-template-columns: 1fr;
    }
    .board-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card,
    .submit-card {
        border-radius: var(--radius-md);
    }
    .auth-header,
    .submit-header {
        padding: 28px 20px;
    }
    .auth-body,
    .submit-body {
        padding: 24px 20px;
    }
}
