:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-secondary: #d946ef;
    --accent-secondary-glow: rgba(217, 70, 239, 0.12);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    transition: background-color 0.5s ease;
}

/* Glass Background Glowing Orbs */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at top, #1e1b4b 0%, #0b0f19 80%);
    z-index: -2;
}

.glow-orb {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 1s ease;
}

#orb-1 {
    top: -100px;
    left: 10%;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
}

#orb-2 {
    bottom: -150px;
    right: 15%;
    background: radial-gradient(circle, var(--accent-secondary-glow) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

#orb-3 {
    top: 40%;
    left: 60%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.2); }
}

/* Layout Structure */
.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(25px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 5px var(--accent); }
    100% { box-shadow: 0 0 20px var(--accent); }
}

.sidebar-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.menu-item.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.12);
    border-left: 3px solid var(--accent);
}

.menu-icon {
    font-size: 16px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.auth-status-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: statusPulse 2s infinite;
}

.status-offline {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Content Area */
.content-area {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
}

.tab-content {
    display: none;
    animation: viewEnter 0.3s ease-out;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

.view-header {
    margin-bottom: 5px;
}

.view-header h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 6px;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

/* Buttons */
.btn {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    border: none;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-group .btn:not(:last-child) {
    border-right: 1px solid var(--card-border);
}

.btn-group .btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.col-span-2 {
    grid-column: span 2;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 36px 0 rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 12px;
}

.card-header h2 {
    font-size: 15px;
    font-weight: 700;
}

.card-header .icon {
    font-size: 16px;
}

.card-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(217, 70, 239, 0.02) 100%);
    border-color: rgba(99, 102, 241, 0.18);
}

/* Lists and Content Widgets */
.scroll-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.scroll-list::-webkit-scrollbar {
    width: 3px;
}

.scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}

.briefing-content {
    font-size: 14px;
    line-height: 1.6;
    color: #e2e8f0;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.briefing-content::-webkit-scrollbar {
    width: 3px;
}

.briefing-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

/* Shared List Items */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
}

.list-item .title {
    font-weight: 500;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item .time-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.list-item .date-badge {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

/* Todos Styles */
.todo-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--card-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
    background: rgba(0,0,0,0.1);
}

.todo-checkbox:checked {
    background: var(--success);
    border-color: var(--success);
}

.todo-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 10px;
    font-weight: 900;
    top: -2px;
    left: 2px;
}

.todo-item.completed .title {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Project Statistics */
.project-summary-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.quick-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action-buttons .btn {
    text-align: left;
    justify-content: flex-start;
    padding: 10px 14px;
}

/* Mini Chat and Full Chat Interfaces */
.mini-chat-box {
    display: flex;
    flex-direction: column;
    height: 200px;
    gap: 10px;
}

.mini-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-chat-messages::-webkit-scrollbar {
    width: 3px;
}

.mini-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.model {
    align-self: flex-start;
}

.message-bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.5;
}

.message.user .message-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 3px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.message.model .message-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-bottom-left-radius: 3px;
    color: #e2e8f0;
}

.mini-chat-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.mini-chat-input-wrapper input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 12px;
}

.mini-chat-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Dedicated Chat Layout */
.chat-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.chat-messages-area {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chat-messages-area::-webkit-scrollbar {
    width: 4px;
}

.chat-messages-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.message-bubble-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.message.user .message-bubble-wrapper {
    align-items: flex-end;
}

.message.user .message-bubble {
    background: var(--accent);
    border-radius: 16px;
    border-bottom-right-radius: 3px;
    font-size: 13.5px;
    padding: 10px 16px;
}

.message.model .message-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    border-bottom-left-radius: 3px;
    font-size: 13.5px;
    padding: 10px 16px;
    max-width: 100%;
    white-space: pre-wrap;
    line-height: 1.6;
}

.chat-input-area {
    padding: 18px 24px;
    border-top: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(15, 23, 42, 0.15);
}

.chat-quick-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.chat-quick-tags::-webkit-scrollbar {
    height: 2px;
}

.chat-quick-tags::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
}

.tag-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tag-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.chat-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-row textarea {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 14px;
    color: white;
    font-size: 13px;
    resize: none;
    line-height: 1.5;
    font-family: inherit;
    max-height: 100px;
}

.chat-input-row textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Kanban Board View */
.kanban-board {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 12px;
    height: calc(100vh - 200px);
}

.kanban-board::-webkit-scrollbar {
    height: 4px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.kanban-column {
    flex: 0 0 270px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.column-header {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-warn {
    color: var(--warning);
}

.column-success {
    color: var(--success);
}

.badge {
    background: rgba(255,255,255,0.06);
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 10px;
    color: var(--text-muted);
}

.column-cards {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-cards::-webkit-scrollbar {
    width: 2px;
}

.column-cards::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.04);
}

/* Kanban Cards styling */
.kanban-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
}

.kanban-card .title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
}

.kanban-card .meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--text-muted);
}

.kanban-card .category-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.kanban-card .progress-bar-container {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.kanban-card .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
}

/* Grid & Table Project view */
.projects-view-mode {
    display: none;
}

.projects-view-mode.active {
    display: block;
}

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

.table-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12.5px;
}

.glass-table th, .glass-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
}

.glass-table th {
    background: rgba(15, 23, 42, 0.25);
    font-weight: 600;
    color: var(--text-muted);
}

.glass-table tr:hover {
    background: rgba(255,255,255,0.01);
}

/* Schedule / Events Split layout */
.schedule-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 4px;
}

.events-timeline::-webkit-scrollbar {
    width: 3px;
}

.events-timeline::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
}

.event-item {
    display: flex;
    gap: 15px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    border-top: 1px solid var(--card-border);
    border-right: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.event-time-col {
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', sans-serif;
    align-items: center;
    min-width: 50px;
}

.event-time-col .date {
    font-size: 9px;
    color: var(--text-muted);
}

.event-time-col .hour {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.event-info-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.event-info-col h3 {
    font-size: 13px;
    font-weight: 600;
}

.event-info-col p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Todo Manager View */
.todo-manager {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-filter-row select {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 4px;
}

.todo-list::-webkit-scrollbar {
    width: 3px;
}

.todo-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
}

/* Document Search view */
.search-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-bar-row {
    display: flex;
    gap: 12px;
}

.search-bar-row input {
    flex-grow: 1;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    color: white;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
}

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

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.search-results-list::-webkit-scrollbar {
    width: 3px;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
}

/* Settings view */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr;
}

.status-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    font-size: 12.5px;
}

.status-row .label {
    font-weight: 500;
}

.divider {
    border: none;
    height: 1px;
    background: var(--card-border);
    margin: 15px 0;
}

.settings-form h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.desc-p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.glass-modal {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalEnter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-lg {
    width: 760px;
}

@keyframes modalEnter {
    from { opacity: 0; transform: scale(0.92) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 65vh;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Forms */
.modal-form {
    display: none;
    flex-direction: column;
    gap: 15px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Risk Detail Layout */
.risk-detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.risk-card {
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--warning);
}

.risk-card p {
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
}

.risk-card-footer {
    display: flex;
    justify-content: flex-end;
}

/* Ideas Grid View */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.idea-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s;
}

.idea-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.idea-card h3 {
    font-size: 13.5px;
    font-weight: 700;
}

.idea-card p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.idea-card-footer {
    font-size: 9.5px;
    color: var(--text-muted);
    margin-top: auto;
}

/* Weekly Briefing View styling */
.briefing-view-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.briefing-rich-content {
    font-size: 13.5px;
    line-height: 1.7;
    color: #cbd5e1;
    white-space: pre-wrap;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    padding-right: 4px;
}

.briefing-rich-content::-webkit-scrollbar {
    width: 3px;
}

.briefing-rich-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
}

/* Idea modal body text formatting */
.proposal-section {
    margin-bottom: 16px;
}

.proposal-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.proposal-section p {
    font-size: 12px;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Calendar View Tab styling */
.calendar-card {
    padding: 24px;
    height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

.calendar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header-row h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.calendar-grid-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}

.calendar-weekdays .weekday.text-red {
    color: var(--danger);
}

.calendar-weekdays .weekday.text-blue {
    color: #38bdf8;
}

.calendar-days {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.calendar-day-cell {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 70px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent);
    transform: scale(1.02);
}

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.today {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.15);
}

.calendar-day-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    align-self: flex-start;
}

.calendar-day-cell.today .calendar-day-number {
    color: var(--text-color);
}

.calendar-day-events {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 65px;
}

.calendar-day-events::-webkit-scrollbar {
    width: 2px;
}

.calendar-day-events::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
}

.calendar-event-tag {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-left: 2px solid var(--accent);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: left;
}

.calendar-event-tag.all-day {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-left-color: var(--success);
}

/* ====================================================
   📱 반응형 미디어 쿼리 - 세로 모드(Portrait) 및 좁은 화면 최적화 (1100px 이하)
   ==================================================== */
@media (max-width: 1100px) {
    /* 1. 전체 레이아웃 상태 유지 (좌우 배치 유지하되 좁은 너비 대응) */
    .app-layout {
        flex-direction: row !important; /* 상하로 분할하지 않고 좌우 관계 유지 */
        height: 100vh !important;
        overflow: hidden !important;
    }

    /* 2. 슬림 사이드바(Slim Sidebar)로 전환하여 가로 공간 확보 */
    .sidebar {
        width: 75px !important; /* 260px에서 75px로 콤팩트 축소 */
        padding: 20px 10px !important;
        align-items: center !important;
        transition: width 0.3s ease;
    }

    /* 로고 텍스트 숨기고 로고 도트만 중앙에 표시 */
    .sidebar-header {
        justify-content: center !important;
        margin-bottom: 25px !important;
        width: 100%;
    }
    
    .sidebar-header h2 {
        display: none !important; /* 텍스트 숨김 */
    }
    
    .logo-dot {
        margin: 0 auto !important;
    }

    /* 메뉴 아이템 텍스트 숨기고 아이콘만 중앙 정렬 */
    .sidebar-menu {
        align-items: center !important;
        width: 100%;
        gap: 12px !important;
    }

    .menu-item {
        justify-content: center !important;
        width: 45px !important;
        height: 45px !important;
        padding: 0 !important;
        border-radius: 12px !important;
        transform: none !important; /* 가로 밀림 애니메이션 제거 */
    }
    
    .menu-item:hover {
        transform: scale(1.05) !important;
    }

    /* 메뉴 글씨 숨기기 (폰트 크기를 0으로 해서 숨김) */
    .menu-item {
        font-size: 0 !important; 
    }
    
    /* 아이콘 크기 살짝 키워 가독성 확보 */
    .menu-icon {
        font-size: 20px !important;
        margin: 0 !important;
    }

    /* 구글 로그인 위젯 슬림화 */
    .sidebar-footer {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: auto;
    }

    .auth-status-container {
        padding: 8px !important;
        border-radius: 12px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 45px !important;
        height: 45px !important;
        position: relative;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--card-border) !important;
    }

    /* 로그인 상태 텍스트 숨기기 */
    #google-status-text, 
    .auth-indicator span:not(.pulse-dot) {
        display: none !important;
    }

    .auth-indicator {
        margin: 0 !important;
        justify-content: center !important;
        position: absolute;
        top: -6px;
        right: -6px;
        background: rgba(11, 15, 25, 0.9);
        padding: 3px;
        border-radius: 50%;
        border: 1px solid var(--card-border);
    }

    .pulse-dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* 구글 계정 연동 버튼을 둥근 작은 열쇠/인증 아이콘 형태로 대체 */
    #google-auth-btn {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        opacity: 0; /* 투명하게 만들어 컨테이너 클릭 시 로그인 동작하도록 오버레이 */
        cursor: pointer;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 연동 상태를 알 수 있게 🔑 아이콘 노출 */
    .auth-status-container::before {
        content: '🔑';
        font-size: 16px;
        pointer-events: none;
    }

    /* 3. 본문 영역 패딩 축소하여 공간 극대화 */
    .content-area {
        padding: 20px !important;
        height: 100vh !important;
        overflow-y: auto !important; /* 내부 스크롤만 활성화 */
    }

    /* 4. 대시보드 위젯 그리드: 2열 배치로 최적화 */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 3열에서 2열로 조정 */
        gap: 15px !important;
    }

    /* 2칸 차지하던 중요 위젯은 2열 상태에서 100% 꽉 채우도록 span 2 유지 */
    .dashboard-grid .col-span-2,
    .dashboard-grid #widget-briefing,
    .dashboard-grid #widget-mini-chat {
        grid-column: span 2 !important;
    }

    /* 5. 캘린더 뷰 높이 및 레이아웃 조절 */
    .calendar-card {
        height: calc(100vh - 160px) !important;
    }
    
    .calendar-day-cell {
        min-height: 55px !important;
    }
    
    .calendar-day-events {
        max-height: 40px !important;
    }

    /* 6. 일정 및 할 일 세로 쌓기 */
    .schedule-layout {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
}

/* ====================================================
   📱 극세 모니터 및 모바일 환경 (768px 이하)
   ==================================================== */
@media (max-width: 768px) {
    /* 모바일에서는 상단바로 전환 및 1열 배치 */
    .app-layout {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    .sidebar {
        width: 100% !important;
        height: auto !important;
        padding: 12px 15px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--card-border) !important;
    }

    .sidebar-header {
        display: flex !important;
        justify-content: flex-start !important;
        margin-bottom: 10px !important;
        width: auto !important;
    }

    .sidebar-header h2 {
        display: block !important;
        font-size: 16px !important;
    }

    .sidebar-menu {
        flex-direction: row !important;
        overflow-x: auto !important;
        width: 100% !important;
        justify-content: flex-start !important;
        padding-bottom: 5px !important;
    }

    .menu-item {
        font-size: 12px !important;
        width: auto !important;
        height: auto !important;
        padding: 6px 12px !important;
        white-space: nowrap !important;
    }

    .sidebar-footer {
        display: none !important; /* 모바일에서는 간소화를 위해 로그인 푸터 생략 */
    }

    .content-area {
        padding: 12px !important;
        height: auto !important;
        overflow-y: visible !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important; /* 모바일에서는 1열 고정 */
    }

    .dashboard-grid .col-span-2,
    .dashboard-grid #widget-briefing,
    .dashboard-grid #widget-mini-chat {
        grid-column: span 1 !important;
    }
}

/* ====================================================
   🎮 AI 에이전트 가상 오피스 & 제어 센터 네온 스타일링
   ==================================================== */

/* 가상 오피스 맵 컨테이너 */
.agent-office-wrapper {
    background: rgba(11, 15, 25, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}

.agent-office-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 12px;
}

.agent-office-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-office-header .status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    display: inline-block;
    animation: pulse 1.8s infinite;
}

/* 2D 픽셀/보드 스타일의 오피스 공간 */
.agent-office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    padding: 10px 0;
}

/* 에이전트 개별 카드 (책상) */
.agent-desk-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.agent-desk-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

/* 에이전트 캐릭터 아바타 프레임 */
.agent-avatar-frame {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.agent-avatar-frame img {
    width: 85%;
    height: 85%;
    border-radius: 50%;
    object-fit: cover;
}

/* 에이전트 이름 & 직무 */
.agent-info-box {
    text-align: center;
    width: 100%;
}

.agent-info-box .name {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.agent-info-box .role-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    display: inline-block;
}

/* 실시간 작업 말풍선 */
.agent-speech-bubble {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 180px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 10.5px;
    line-height: 1.4;
    color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    text-align: center;
}

.agent-speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
}

/* 마우스 호버 시 또는 활성화 시 말풍선 노출 */
.agent-desk-card:hover .agent-speech-bubble,
.agent-desk-card.active .agent-speech-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 에이전트 동작 상태별 헬퍼 (네온 효과) */
.agent-desk-card.idle .agent-avatar-frame {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.agent-desk-card.working .agent-avatar-frame {
    border-color: #6366f1;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
    animation: activePulse 1.5s infinite;
}

.agent-desk-card.working .role-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.agent-desk-card.analyzing .agent-avatar-frame {
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
    animation: spinBorder 4s linear infinite;
}

.agent-desk-card.analyzing .role-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* 에이전트 애니메이션 정의 */
@keyframes activePulse {
    0% { transform: scale(1); box-shadow: 0 0 4px rgba(99, 102, 241, 0.4); }
    50% { transform: scale(1.04); box-shadow: 0 0 16px rgba(99, 102, 241, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 4px rgba(99, 102, 241, 0.4); }
}

@keyframes spinBorder {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 정무적 결재/승인 대기 보드 디자인 */
.decision-board-wrapper {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px;
}

.decision-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.decision-live-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s;
}

.decision-live-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.decision-live-card h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

.decision-options-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.decision-option-item {
    background: rgba(255, 255, 255, 0.01);
    padding: 6px 10px;
    border-radius: 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.decision-action-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
}

/* 네온 컬러 결재 승인/반려 버튼 */
.btn-approve {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: all 0.2s;
}

.btn-approve:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.btn-reject {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
    color: white;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    transition: all 0.2s;
}

.btn-reject:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

.decision-live-card.completed {
    opacity: 0.65;
    background: rgba(255, 255, 255, 0.01);
}

.decision-live-card.completed .decision-action-btns {
    display: none;
}

/* ==================================================
   🔓 브롤 에이전트 추가 채용 센터 및 시뮬레이터 스타일
   ================================================== */

/* 에이전트 채용 카드 */
.agent-recruit-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 잠금(Locked) 상태 스타일 */
.agent-recruit-card.locked {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.04);
}

.agent-recruit-card.locked .recruit-avatar-frame {
    filter: grayscale(1) opacity(0.4);
}

.agent-recruit-card.locked .recruit-name {
    color: var(--text-muted);
}

.agent-recruit-card.locked .recruit-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.3s;
}

.agent-recruit-card.locked .recruit-lock-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

/* 잠금 해제(Hired) 상태 스타일 */
.agent-recruit-card.hired {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.03);
}

.agent-recruit-card.hired .recruit-avatar-frame {
    animation: recruitPulse 2s infinite alternate;
}

@keyframes recruitPulse {
    from { box-shadow: 0 0 4px rgba(99,102,241,0.2); }
    to { box-shadow: 0 0 12px rgba(99,102,241,0.5); }
}

.recruit-avatar-frame {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.recruit-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.recruit-role {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    height: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.btn-recruit-action {
    width: 100%;
    padding: 6px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
}

.agent-recruit-card.locked .btn-recruit-action {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.agent-recruit-card.locked .btn-recruit-action:hover {
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.agent-recruit-card.hired .btn-recruit-action {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.agent-recruit-card.hired .btn-recruit-action:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
}

.recruit-tab-btn.active {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* 시뮬레이션 비주얼라이저 노드 맵 */
.flow-node {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.flow-node.active {
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.35);
    animation: flowPulse 1.5s infinite alternate;
}

@keyframes flowPulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.flow-node.completed {
    border-color: var(--success);
    color: var(--success);
    opacity: 0.8;
}

.flow-arrow {
    font-size: 12px;
    color: var(--card-border);
    animation: arrowFlow 1s infinite linear;
}

.flow-node.active + .flow-arrow {
    color: var(--accent);
}

/* 시뮬레이션 타임라인 피드 */
.timeline-feed-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    animation: feedSlideIn 0.3s ease-out;
}

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

.feed-avatar {
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    flex-shrink: 0;
}

.feed-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.feed-header {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.feed-name {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}

.feed-task {
    font-size: 9px;
    color: var(--accent-secondary);
    background: rgba(168, 85, 247, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
}

.feed-time {
    font-size: 9px;
    color: var(--text-muted);
}

.feed-log {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.4;
}

/* 폼 다크 스타일렉션 */
.form-select-dark:focus {
    outline: none;
    border-color: var(--accent);
}

/* ====================================================
   📦 구글 서비스 통합 실시간 제어판 위젯 스타일 (Tasks & Keep)
   ==================================================== */

/* 구글 태스크 개별 할 일 아이템 */
.integrated-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.integrated-task-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

/* 커스텀 체크박스 */
.task-checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.task-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.task-checkbox-wrapper:hover input ~ .task-checkmark {
    border-color: var(--accent);
}

.task-checkbox-wrapper input:checked ~ .task-checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.task-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.task-checkbox-wrapper input:checked ~ .task-checkmark:after {
    display: block;
}

.task-checkbox-wrapper .task-checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.task-info-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.task-info-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #f1f5f9;
    transition: color 0.2s;
}

.task-info-meta {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-info-badge {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* 태스크 랭크 컨트롤 (빨간원 / 별표 토글 버튼군) */
.task-rank-btns {
    display: flex;
    gap: 4px;
}

.btn-rank-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.4;
    transition: all 0.2s;
}

.btn-rank-toggle:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.btn-rank-toggle.active {
    opacity: 1;
    transform: scale(1.1);
}

/* 구글 킵 메모 보드 디자인 */
.keep-board-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* 인라인 추가 영역 */
.keep-inline-add-card {
    transition: border-color 0.2s;
}

.keep-inline-add-card:focus-within {
    border-color: rgba(234, 179, 8, 0.4) !important;
}

/* 킵 메모 개별 카드 */
.keep-memo-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: all 0.25s ease;
    border-top: 3px solid rgba(234, 179, 8, 0.4); /* 킵 골드 옐로우 보더 */
}

.keep-memo-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.05);
}

.keep-memo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.keep-memo-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #f8fafc;
}

.btn-delete-keep {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-delete-keep:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.keep-memo-content {
    font-size: 11.5px;
    line-height: 1.5;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-all;
}

.keep-memo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 9px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 6px;
}

/* ====================================================
   🛠️ 작업 로그(Work Logs) 타임라인 & 동기화 UI 스타일
   ==================================================== */
.worklogs-timeline-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 20px;
    position: relative;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 8px;
}

.worklogs-timeline-container::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 4px;
    bottom: 5px;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.worklog-timeline-item {
    position: relative;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.worklog-timeline-item:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.04);
}

/* 타임라인 노드 장식 원 */
.worklog-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 26px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--card-border);
    border: 2px solid #0b0f19;
    z-index: 2;
    transition: all 0.25s ease;
}

.worklog-timeline-item:hover::before {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.worklog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.worklog-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.worklog-title-area h3 {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.worklog-meta-area {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
}

.worklog-desc-content {
    font-size: 12.5px;
    line-height: 1.6;
    color: #cbd5e1;
    white-space: pre-wrap;
}

/* 변경된 파일 목록 칩 그룹 */
.worklog-files-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.worklog-files-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.worklog-file-chip {
    font-size: 10px;
    font-family: 'Outfit', Consolas, monospace;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 6px;
}

/* 작업자 종류별 배지 색상 */
.worklog-author-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.worklog-author-badge.user {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.worklog-author-badge.assistant {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
}

.worklog-author-badge.agent {
    background: rgba(234, 179, 8, 0.1);
    color: #facc15;
}

/* 스크롤바 디자인 */
.worklogs-timeline-container::-webkit-scrollbar {
    width: 4px;
}

.worklogs-timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────
   📊 AI 에이전트 실시간 종합 현황판 테이블 디자인 (glass-table)
   ───────────────────────────────────────────────────────────── */
.glass-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.glass-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-table td {
    padding: 14px 12px;
    font-size: 12.5px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* 행(Row) 호버 효과 추가 */
.glass-table tbody tr {
    transition: background-color 0.2s ease;
}

.glass-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

