/**
 * AptoPulse Main Stylesheet
 * Imports modular CSS files for better organization
 */

/* ===== Base Styles ===== */
@import url('base/variables.css');
@import url('base/themes.css');

/* ===== Component Styles ===== */
@import url('components/buttons.css');
@import url('components/forms.css');
@import url('components/modals.css');
@import url('components/alerts.css');
@import url('components/cards.css');

/* ===== Feature Styles ===== */
@import url('features/calendar.css');
@import url('features/day-view.css');
@import url('features/tasks.css');
@import url('features/inbox.css');
@import url('features/issues-panel.css');
@import url('features/commits.css');
@import url('features/tickets.css');
@import url('features/google-calendar.css');
@import url('features/compact-mode.css');
@import url('features/card-colors.css');
@import url('features/realtime-sync.css');

/* ===== Global Resets ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height-relaxed);
    min-height: 100vh;
}

/* ===== Login Page ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-5);
}

.login-box {
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: var(--space-10);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
}

/* ===== Main Layout ===== */
.container {
    width: 100%;
    padding: 0;
    margin: 0;
    height: 100vh;
}

/* ===== Hamburger Button ===== */
.hamburger-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px 8px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    opacity: 0.7;
}

.hamburger-btn .icon {
    width: 20px;
    height: 20px;
}

/* ===== General Icon Styles ===== */
.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
    pointer-events: none;
    filter: invert(1);
}

.icon-inline {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    pointer-events: none;
    color: var(--text-primary);
}

.inbox-icon {
    margin-right: 6px;
}

/* ===== Dropdown Menu ===== */
.dropdown-menu {
    position: absolute;
    top: 40px;
    right: 10px;
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: var(--z-index-dropdown);
}

.dropdown-header {
    padding: var(--space-3) var(--space-4);
    border-bottom: var(--border-width-thin) solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-user {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.close-menu {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: 0;
}

.dropdown-content {
    padding: var(--space-2) 0;
}

.dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-colors);
}

body:not(.light-mode) .dropdown-item img {
    filter: invert(1);
}

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

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

.dropdown-divider {
    margin: var(--space-2) 0;
    border: none;
    border-top: var(--border-width-thin) solid var(--border-color);
}

/* ===== Loading State ===== */
.loading {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-secondary);
}

.loading-spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid rgba(150, 30, 30, 1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

/* Light Mode */
body.light-mode .loading-spinner {
    border-top-color: var(--accent-primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: var(--space-10);
    color: var(--text-secondary);
}

/* ===== Tooltips ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    border-radius: var(--border-radius-sm);
    padding: var(--space-1) var(--space-2);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: var(--transition-fast);
    font-size: var(--font-size-xs);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===== Context Menu ===== */
.context-menu {
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-xl);
    position: absolute;
    z-index: var(--z-index-dropdown);
    min-width: 160px;
    padding: var(--space-1);
}

.context-menu-item {
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    border-radius: var(--border-radius-xs);
    font-size: var(--font-size-sm);
    transition: var(--transition-colors);
}

.context-menu-item:hover {
    background: var(--bg-hover);
}

.context-menu-divider {
    height: var(--border-width-thin);
    background: var(--border-color);
    margin: var(--space-1) 0;
}

.context-menu-item.disabled {
    opacity: var(--opacity-disabled);
    cursor: not-allowed;
}

.context-menu-item.disabled:hover {
    background: transparent;
}

/* ===== Inline Allocation Editor ===== */
.inline-allocation-editor {
    position: absolute;
    right: 2px;
    top: 2px;
    z-index: 100;
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid rgba(150, 30, 30, 1);
    border-radius: var(--border-radius-sm);
    padding: var(--space-2);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
}

/* Light Mode */
body.light-mode .inline-allocation-editor {
    border-color: var(--accent-primary);
}

.inline-allocation-editor input[type="number"] {
    width: 60px;
    padding: 2px 4px;
    font-size: 11px;
    background: var(--bg-primary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-xs);
    color: var(--text-primary);
}

/* Legacy inline-editor class (alias) */
.inline-editor {
    position: absolute;
    background: var(--bg-secondary);
    border: var(--border-width-medium) solid rgba(150, 30, 30, 1);
    border-radius: var(--border-radius-sm);
    padding: var(--space-3);
    z-index: var(--z-index-dropdown);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
}

/* Light Mode */
body.light-mode .inline-editor {
    border-color: var(--accent-primary);
}

.inline-editor-header {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.inline-editor-input {
    width: 100%;
    padding: var(--space-2);
    background: var(--bg-primary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
}

.inline-editor-actions {
    display: flex;
    gap: var(--gap-sm);
    justify-content: flex-end;
}

/* ===== Settings Page ===== */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-5);
}

.settings-section {
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.settings-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: var(--line-height-relaxed);
}

/* ===== GitHub Admin Grid Layout ===== */
.github-admin-container {
    padding: var(--space-5);
    max-width: 1200px;
    margin: 0 auto;
}

.github-admin-header {
    margin-bottom: var(--space-6);
}

.github-admin-header h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
}

.github-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap-lg);
}

.github-admin-card {
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-5);
}

.github-admin-card h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

/* ===== Date Picker ===== */
.date-picker-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.quick-date-buttons {
    display: flex;
    gap: var(--gap-xs);
    margin-top: var(--space-2);
    flex-wrap: wrap;
}

.quick-date-buttons .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
}

.quick-date-buttons .btn-sm:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

/* ===== Projects Management Page ===== */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: var(--border-width-thin) solid var(--border-color);
}

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

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

.projects-header .header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.projects-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

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

.project-card {
    background: var(--bg-secondary);
    border: var(--border-width-thin) solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    transition: var(--transition-all);
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.project-team {
    display: inline-block;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
}

.project-actions {
    display: flex;
    gap: var(--gap-sm);
}

.project-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: var(--line-height-relaxed);
}

.project-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.project-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--border-radius-xs);
}

.project-status.status-active {
    background: rgba(90, 122, 90, 0.2);
    color: var(--accent-green);
}

.project-status.status-on_hold {
    background: rgba(138, 122, 74, 0.2);
    color: var(--accent-yellow);
}

.project-status.status-completed {
    background: rgba(150, 30, 30, 0.2);
    color: rgba(150, 30, 30, 1);
}

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

.project-meta {
    display: flex;
    gap: var(--gap-md);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* ===== Admin Panel ===== */
.calendar-container.admin-container {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    display: block;
}

.admin-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* ===== Integration Control Bar ===== */
.integration-control-bar {
    background: var(--bg-secondary);
    border: 0.5px solid rgba(200, 92, 92, 0.25);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

/* Light Mode */
body.light-mode .integration-control-bar {
    border-color: rgba(200, 92, 92, 0.35);
}

.control-bar-header {
    margin-bottom: 16px;
}

.control-bar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: 0.01em;
}

.control-bar-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.control-bar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.poll-btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 0.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease,
                border-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.poll-btn svg {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.poll-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--bg-hover);
    border-color: var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

.poll-btn:hover:not(:disabled) svg {
    opacity: 1;
}

.poll-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.poll-github {
    border-color: rgba(230, 150, 100, 0.3);
}

/* Light Mode */
body.light-mode .poll-github {
    border-color: rgba(230, 130, 80, 0.4);
}

.poll-github:hover:not(:disabled) {
    border-color: rgba(230, 150, 100, 0.5);
    box-shadow: 0 4px 12px rgba(230, 150, 100, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Light Mode */
body.light-mode .poll-github:hover:not(:disabled) {
    border-color: rgba(230, 130, 80, 0.6);
}

.poll-zendesk {
    border-color: rgba(240, 200, 100, 0.3);
}

/* Light Mode */
body.light-mode .poll-zendesk {
    border-color: rgba(220, 180, 70, 0.4);
}

.poll-zendesk:hover:not(:disabled) {
    border-color: rgba(240, 200, 100, 0.5);
    box-shadow: 0 4px 12px rgba(240, 200, 100, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Light Mode */
body.light-mode .poll-zendesk:hover:not(:disabled) {
    border-color: rgba(220, 180, 70, 0.6);
}

.poll-calendar {
    border-color: rgba(120, 180, 220, 0.3);
}

/* Light Mode */
body.light-mode .poll-calendar {
    border-color: rgba(80, 150, 200, 0.4);
}

.poll-calendar:hover:not(:disabled) {
    border-color: rgba(120, 180, 220, 0.5);
    box-shadow: 0 4px 12px rgba(120, 180, 220, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Light Mode */
body.light-mode .poll-calendar:hover:not(:disabled) {
    border-color: rgba(80, 150, 200, 0.6);
}

/* Control Separator */
.control-separator {
    width: 1px;
    height: 38px;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--border-color) 20%,
        var(--border-color) 80%,
        transparent 100%);
    margin: 0 8px;
}

/* Poll All Button */
.poll-all {
    border-color: rgba(100, 200, 150, 0.4);
    font-weight: 600;
}

.poll-all:hover:not(:disabled) {
    border-color: rgba(100, 200, 150, 0.6);
    background: rgba(100, 200, 150, 0.08);
    box-shadow: 0 4px 12px rgba(100, 200, 150, 0.2),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Loading state for buttons */
.poll-btn:disabled {
    position: relative;
}

.poll-btn:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid var(--text-secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Process Viewer ===== */
.integration-process-viewer {
    background: var(--bg-secondary);
    border: 0.5px solid rgba(200, 92, 92, 0.25);
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode */
body.light-mode .integration-process-viewer {
    border-color: rgba(200, 92, 92, 0.35);
}

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

.process-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(200, 92, 92, 0.08);
    border-bottom: 1px solid rgba(200, 92, 92, 0.15);
}

/* Light Mode */
body.light-mode .process-viewer-header {
    background: rgba(200, 92, 92, 0.12);
    border-bottom-color: rgba(200, 92, 92, 0.25);
}

.process-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.process-status.success {
    color: rgb(150, 210, 150);
}

/* Light Mode */
body.light-mode .process-status.success {
    color: rgb(50, 140, 50);
}

.process-status.error {
    color: rgb(230, 120, 120);
}

/* Light Mode */
body.light-mode .process-status.error {
    color: rgb(180, 50, 50);
}

.process-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.process-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.process-viewer-content {
    padding: 20px;
    min-height: 80px;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
}

.process-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(200, 92, 92, 0.2);
    border-top-color: rgba(200, 92, 92, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

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

.process-result {
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
}

.process-result.success {
    background: rgba(140, 200, 140, 0.1);
    border: 1px solid rgba(140, 200, 140, 0.3);
}

.process-result.error {
    background: rgba(230, 120, 120, 0.1);
    border: 1px solid rgba(230, 120, 120, 0.3);
}

.process-result h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.process-result ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.process-result li {
    padding: 6px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.process-result li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: var(--border-width-medium) solid var(--border-color);
}

.admin-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.admin-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table thead {
    background: var(--bg-tertiary);
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: var(--border-width-medium) solid var(--border-color);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: var(--border-width-thin) solid var(--border-light);
    color: var(--text-primary);
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(150, 30, 30, 1);
    color: #ffffff;
}

/* Light Mode */
body.light-mode .badge-primary {
    background: var(--accent-primary);
}

.badge-success {
    background: var(--accent-green);
    color: #ffffff;
}

.badge-muted {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.admin-welcome {
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* ===== Calendar Behaviors Styles ===== */
.behavior-setting {
    padding: 25px;
    margin-bottom: 25px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    border: var(--border-width-thin) solid var(--border-color);
}

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

.behavior-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.behavior-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: var(--line-height-relaxed);
}

.behavior-details {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.behavior-details strong {
    color: var(--text-primary);
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
}

.behavior-details ul {
    margin: 5px 0 10px 20px;
    padding: 0;
}

.behavior-details li {
    margin: 3px 0;
}

/* ===== Toggle Switch Styles ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

/* Light Mode */
body.light-mode .toggle-slider:before {
    background-color: #ffffff;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(150, 30, 30, 1);
}

/* Light Mode */
body.light-mode .toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px rgba(150, 30, 30, 1);
}

/* Light Mode */
body.light-mode .toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--accent-primary);
}

/* ===== Zendesk Ticket Cards ===== */
.zendesk-card {
    background: var(--bg-tertiary);
    border: 0.5px solid rgba(240, 200, 100, 0.25);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease,
                border-color 0.2s ease;
    margin-top: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    letter-spacing: 0.01em;
}

/* Extra spacing when zendesk card comes directly after a task */
.task-card + .zendesk-card {
    margin-top: calc(var(--space-3) - var(--gap-xs));
}

.zendesk-card:hover {
    background: var(--bg-hover);
    border-color: rgba(240, 200, 100, 0.4);
    transform: translateY(-3px) scale(1.005);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(240, 200, 100, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.zendesk-header {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
    margin-bottom: var(--space-05);
    color: rgb(160, 120, 50); /* Soft yellow-tinted - maximum contrast */
}

.zendesk-id {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-2xs);
    color: var(--color-zendesk-accent);
}

.zendesk-time {
    font-size: var(--font-size-2xs);
    color: rgb(160, 120, 50); /* Muted yellow-tinted - maximum contrast */
    margin-left: auto;
}

.zendesk-subject {
    color: rgb(170, 130, 60); /* Yellow-tinted text - maximum contrast */
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zendesk-subject.ticket-high-priority {
    color: var(--accent-red);
    font-weight: var(--font-weight-semibold);
}

.zendesk-status {
    font-size: 10px;
    display: inline-flex;
    align-items: center;
}

.zendesk-status .icon-inline {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    color: rgb(170, 130, 60); /* Dark yellow to match zendesk subject */
}

.zendesk-update-count {
    font-size: var(--font-size-2xs);
    background: rgba(240, 200, 100, 0.2);
    color: rgb(240, 200, 100);
    border: 1px solid rgba(240, 200, 100, 0.5);
    padding: 1px 4px;
    border-radius: 10px;
    font-weight: var(--font-weight-bold);
    margin-left: auto;
}

.zendesk-update-count-badge {
    font-size: var(--font-size-2xs);
    background: rgba(240, 200, 100, 0.2);
    color: rgb(240, 200, 100);
    border: 1px solid rgba(240, 200, 100, 0.5);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: var(--font-weight-bold);
    margin-left: var(--space-1);
}

/* Capacity Grid */
.capacity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Checkbox Groups */
.checkbox-group {
    margin: 8px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-group label:hover {
    background: var(--bg-hover);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Loading State */
.loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Tooltips */
.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: var(--z-index-tooltip);
}

/* ===== PHASE 3.5: Status Column Display ===== */
/* Display task status using dashboard column color */
.task-status-label {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--status-color, #3b82f6);
    text-transform: capitalize;
    display: inline-block;
    margin-top: 0;
    opacity: 0.9;
}

/* Hover effect for status labels */
.task-status-label:hover {
    opacity: 1;
}

/* ===== Zendesk Day-Grouped Cards ===== */
.zendesk-day-group {
    background: var(--bg-secondary);
    border-left: 3px solid rgb(178 156 91);
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Light Mode */
body.light-mode .zendesk-day-group {
    border-left-color: rgb(140, 110, 60);
}

.zendesk-day-group:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.zendesk-day-group .zendesk-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zendesk-day-group .zendesk-label {
    font-size: 12px;
    color: rgb(178 156 91);
    font-weight: normal;
    font-style: normal;
}

/* Light Mode */
body.light-mode .zendesk-day-group .zendesk-label {
    color: rgb(120, 90, 40);
}

.zendesk-day-group .zendesk-count {
    background: #d5b52c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
    margin-left: auto;
    min-width: 24px;
    text-align: center;
}

/* Light Mode */
body.light-mode .zendesk-day-group .zendesk-count {
    background: #c5a520;
}

/* ===== Print Styles ===== */
@media print {
    .hamburger-btn,
    .dropdown-menu,
    .inbox-toggle,
    .task-inbox {
        display: none !important;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .projects-list {
        grid-template-columns: 1fr;
    }

    .admin-panel {
        padding: 20px 10px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: var(--space-3);
    }

    .admin-panel {
        padding: 20px 10px;
    }

    .projects-container {
        padding: 10px;
    }
}

/* ===== GitHub PR Cards ===== */
.github-pr-card {
    background: var(--bg-tertiary);
    border: 0.5px solid rgba(230, 150, 100, 0.25);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease,
                border-color 0.2s ease;
    margin-top: 0;
    animation: fadeIn 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    letter-spacing: 0.01em;
}

/* Extra spacing when PR card comes after other elements */
.task-card + .github-pr-card,
.commit-card + .github-pr-card {
    margin-top: calc(var(--space-3) - var(--gap-xs));
}

.github-pr-card:hover {
    background: var(--bg-hover);
    border-color: rgba(230, 150, 100, 0.4);
    transform: translateY(-3px) scale(1.005);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(230, 150, 100, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.github-pr-content {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.github-pr-role {
    font-size: var(--font-size-2xs);
    opacity: 0.8;
    flex-shrink: 0;
}

.github-pr-number {
    font-weight: var(--font-weight-semibold);
    font-size: 12px;
    color: rgb(200 125 75 / 95%);
    flex-shrink: 0;
}

.github-pr-repo {
    display: none; /* Hidden - takes too much space */
}

.github-pr-title {
    color: rgb(200 125 75 / 95%);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Container styles */
.github-prs-container {
    background: rgba(52, 48, 44, 0.3) !important;
    border: 0.5px solid rgba(200, 140, 110, 0.2) !important;
    border-radius: 8px !important;
    padding: 6px;
    margin-bottom: 8px;
}

.github-prs-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.github-prs-hidden {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.github-prs-show-more {
    text-align: center;
    padding: 6px 10px;
    margin-top: 6px;
    font-size: 11px;
    color: rgb(200, 140, 110);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.github-prs-show-more:hover {
    background: rgba(200, 140, 110, 0.1);
    color: rgb(220, 160, 130);
}

/* Light mode container */
body.light-mode .github-prs-container {
    background: rgba(245, 242, 238, 0.4) !important;
}

body.light-mode .github-prs-show-more {
    color: rgb(200, 130, 100);
}

body.light-mode .github-prs-show-more:hover {
    background: rgba(200, 130, 100, 0.15);
    color: rgb(180, 110, 80);
}

/* ===== GitHub Issues ===== */
.github-issue-card {
    background: var(--bg-tertiary);
    border: 0.5px solid rgba(150, 230, 100, 0.25);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease,
                border-color 0.2s ease;
    margin-top: 0;
    animation: fadeIn 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    letter-spacing: 0.01em;
}

/* Extra spacing when Issue card comes after other elements */
.task-card + .github-issue-card,
.commit-card + .github-issue-card,
.github-pr-card + .github-issue-card {
    margin-top: calc(var(--space-3) - var(--gap-xs));
}

.github-issue-card:hover {
    background: var(--bg-hover);
    border-color: rgba(150, 230, 100, 0.4);
    transform: translateY(-3px) scale(1.005);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(150, 230, 100, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

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

.github-issue-number {
    font-weight: var(--font-weight-semibold);
    font-size: 12px;
    color: rgb(125 200 75 / 95%);
    flex-shrink: 0;
}

.github-issue-repo {
    font-size: 11px;
    color: rgb(125 200 75 / 70%);
    flex-shrink: 0;
}

.github-issue-title {
    color: rgb(125 200 75 / 95%);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.github-issue-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.github-issue-label {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Container styles */
.github-issues-container {
    background: rgba(48, 52, 44, 0.3) !important;
    border: 0.5px solid rgba(140, 200, 110, 0.2) !important;
    border-radius: 8px !important;
    padding: 6px;
    margin-bottom: 8px;
}

.github-issues-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.github-issues-hidden {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.github-issues-show-more {
    text-align: center;
    padding: 6px 10px;
    margin-top: 6px;
    font-size: 11px;
    color: rgb(140, 200, 110);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.github-issues-show-more:hover {
    background: rgba(140, 200, 110, 0.1);
    color: rgb(160, 220, 130);
}

/* Light mode container */
body.light-mode .github-issues-container {
    background: rgba(242, 245, 238, 0.4) !important;
}

body.light-mode .github-issues-show-more {
    color: rgb(130, 200, 100);
}

body.light-mode .github-issues-show-more:hover {
    background: rgba(130, 200, 100, 0.15);
    color: rgb(110, 180, 80);
}

