/* Accelo Time Tracker Styles - Version 1.0.1 - Updated 2026-01-13 */

#appLoadingScreen {
    position: fixed;
    inset: 0;
    background: #1a1a1a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

#appLoadingScreen .app-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #333;
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

#appLoadingScreen .app-loading-title {
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#appLoadingScreen .app-loading-subtitle {
    color: #666;
    font-size: 13px;
}

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
}

.container {
    background: #1a1a1a;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Login Screen */
.login-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.login-card {
    background: #252525;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 400px;
}

.login-card h1 {
    color: #e0e0e0;
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.login-card p {
    color: #888;
    font-size: 16px;
    margin-bottom: 40px;
}

.btn-login {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

header {
    padding: 15px 20px;
    background: #252525;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #e0e0e0;
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

header p {
    color: #888;
    font-size: 13px;
}

.config-section,
.main-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

.config-section {
    background: #252525;
    padding: 40px;
    align-items: center;
    justify-content: center;
}

.config-section h2,
.main-section h2 {
    color: #e0e0e0;
    font-size: 20px;
    margin-bottom: 20px;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.form-group.scrollable {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #b0b0b0;
    font-weight: 600;
    font-size: 13px;
}

.form-control {
    padding: 10px;
    border: 1px solid #404040;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #2a2a2a;
    color: #e0e0e0;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: #2f2f2f;
}

.duration-input-group {
    display: flex;
    gap: 10px;
}

.duration-input-group input {
    flex: 1;
}

.duration-input-group select {
    width: 120px;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-primary:active {
    background: #4a5fc1;
}

.btn-secondary {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #404040;
}

.btn-secondary:hover {
    background: #404040;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.status-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.status-message.success {
    background: #1a3d2a;
    color: #4ade80;
    border: 1px solid #2a5a3a;
    display: block;
}

.status-message.error {
    background: #3d1a1a;
    color: #ff6b6b;
    border: 1px solid #5a2a2a;
    display: block;
}

.status-message.info {
    background: #1a2a3d;
    color: #60a5fa;
    border: 1px solid #2a3a5a;
    display: block;
}

select.form-control {
    cursor: pointer;
}

select.form-control:disabled {
    background-color: #2a2a2a;
    cursor: not-allowed;
    opacity: 0.5;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    grid-template-rows: 100%;
    gap: 0;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #252525;
    border-right: 1px solid #333;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}

/* Year-to-Date Hours Display */
.ytd-hours-display {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 10px 12px;
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ytd-hours-display:hover {
    background: #333;
    border-color: #667eea;
}

.ytd-hours-value {
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.ytd-hours-label {
    color: #888;
    font-size: 13px;
    font-weight: 400;
}

/* YTD Breakdown Styles */
.ytd-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ytd-task-item {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ytd-task-name {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.ytd-task-hours {
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.ytd-total-row {
    background: #333;
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.ytd-total-label {
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ytd-total-hours {
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
}

.ytd-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 14px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.calendar-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.65);
    z-index: 50;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.calendar-loading-overlay.visible {
    display: flex;
}

.calendar-loading-overlay .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #333;
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.calendar-loading-overlay .spinner-label {
    color: #aaa;
    font-size: 13px;
    letter-spacing: 0.02em;
}

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

/* Project List */
.project-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 6px;
    background: #2a2a2a;
    min-height: 0;
    max-height: 100%;
}


/* Task List */
.task-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 6px;
    min-height: 0;
    max-height: 100%;
    background: #2a2a2a;
}

.task-item {
    padding: 10px;
    margin: 3px 0;
    border-radius: 4px;
    cursor: grab;
    background: #333;
    border: 1px solid #404040;
    transition: all 0.2s;
}

.task-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.task-item:active {
    cursor: grabbing;
    opacity: 0.7;
}

.task-item-name {
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
}

.task-item-info {
    color: #888;
    font-size: 11px;
    margin-top: 3px;
}

/* Tree View Container */
.tree-view-container {
    flex: 3;
    min-height: 300px;
}

.tree-view {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 6px;
    min-height: 0;
    max-height: 100%;
    background: #2a2a2a;
}

/* Tree Node */
.tree-node {
    user-select: none;
}

.tree-node-content {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 6px;
}

.tree-node-content:hover {
    background: #333;
}

.tree-node.draggable .tree-node-content {
    cursor: grab;
}

.tree-node.draggable .tree-node-content:active {
    cursor: grabbing;
}

/* Tree Arrow */
.tree-arrow {
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
    font-size: 10px;
    color: #888;
    cursor: pointer;
    transition: transform 0.2s;
    line-height: 16px;
}

.tree-arrow.expanded {
    transform: rotate(90deg);
}

.tree-arrow:hover {
    color: #e0e0e0;
}

.tree-arrow-spacer {
    display: inline-block;
    width: 16px;
}

/* Tree Icon */
.tree-icon {
    font-size: 16px;
    line-height: 1;
}

/* Tree Name */
.tree-name {
    color: #e0e0e0;
    font-size: 13px;
    flex: 1;
}

/* Tree Children */
.tree-children {
    margin-left: 0;
}

/* Draggable tree items (tasks and issues) */
.tree-node.draggable .tree-node-content {
    background: #333;
    border: 1px solid #404040;
    position: relative;
}

.tree-node.draggable .tree-node-content::after {
    content: '⋮⋮';
    position: absolute;
    right: 8px;
    color: #666;
    font-size: 12px;
    letter-spacing: -2px;
}

.tree-node.draggable .tree-node-content:hover {
    background: #3a3a3a;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tree-node.draggable .tree-node-content:hover::after {
    color: #667eea;
}

/* Different node types styling */
.tree-node[data-node-type="company"] .tree-node-content {
    font-weight: 500;
}

.tree-node[data-node-type="project"] .tree-node-content,
.tree-node[data-node-type="retainer"] .tree-node-content {
    font-weight: 400;
}

.tree-node[data-node-type="task"] .tree-icon,
.tree-node[data-node-type="issue"] .tree-icon {
    font-size: 14px;
}

/* Project List (Updated) */
.project-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 6px;
    min-height: 0;
    max-height: 100%;
    background: #2a2a2a;
}

.project-item {
    padding: 8px;
    margin: 3px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-item:hover {
    background: #333;
}

.project-item.selected {
    background: #3a3a5a;
    border-color: #667eea;
    font-weight: 600;
}

/* Retainer List */
.retainer-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 6px;
    min-height: 0;
    max-height: 100%;
    background: #2a2a2a;
}

.retainer-item {
    padding: 8px;
    margin: 3px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.retainer-item:hover {
    background: #333;
}

.retainer-item.selected {
    background: #3a3a5a;
    border-color: #667eea;
    font-weight: 600;
}

/* Common item styling */
.item-icon {
    font-size: 16px;
    line-height: 1;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-name {
    color: #e0e0e0;
    font-size: 13px;
}

.item-id {
    color: #888;
    font-size: 11px;
}

/* Task/Issue List */
.task-issue-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #404040;
    border-radius: 6px;
    padding: 6px;
    min-height: 0;
    max-height: 100%;
    background: #2a2a2a;
}

.task-issue-item {
    padding: 10px;
    margin: 3px 0;
    border-radius: 4px;
    cursor: grab;
    background: #333;
    border: 1px solid #404040;
    transition: all 0.2s;
}

.task-issue-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.task-issue-item:active {
    cursor: grabbing;
    opacity: 0.7;
}

.task-issue-item-name {
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
}

.task-issue-item-info {
    color: #888;
    font-size: 11px;
    margin-top: 3px;
}

/* Section Headers */
.section-header {
    padding: 8px 6px;
    margin: 6px 0 3px 0;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #404040;
}

.loading-message, .info-message, .error-message {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.loading-message-small, .info-message-small, .error-message-small {
    padding: 8px 12px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

.error-message, .error-message-small {
    color: #ff6b6b;
}

/* Calendar Toolbar */
.calendar-toolbar {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #252525;
    border-bottom: 1px solid #333;
    gap: 20px;
}

.calendar-nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-week-title {
    margin: 0;
    font-size: 16px;
    color: #e0e0e0;
    font-weight: 600;
    flex: 1;
}

.week-jump-input {
    padding: 6px 10px;
    border: 1px solid #404040;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: #2a2a2a;
    color: #e0e0e0;
}

.week-jump-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-nav-arrow {
    background: #333;
    border: 1px solid #404040;
    color: #e0e0e0;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-nav-arrow:hover {
    background: #404040;
    border-color: #505050;
}

.calendar-grid-week {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    grid-template-rows: auto 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
    background: #1e1e1e;
    overflow-y: auto;
    overflow-x: hidden;
}

.calendar-time-header {
    background: #252525;
    border-right: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 20;
}

.calendar-day-header {
    text-align: center;
    padding: 15px 10px;
    font-weight: 600;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    background: #252525;
    border-right: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 20;
}

.calendar-day-header:last-of-type {
    border-right: none;
}

.calendar-day {
    padding: 0;
    background: #1e1e1e;
    border-right: 1px solid #2a2a2a;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-height: 0;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: #252525;
}

/* Disable hover effect during drag operations */
body.dragging .calendar-day:hover {
    background: #1e1e1e !important;
}

/* Ensure calendar-day background stays unchanged during drag */
body.dragging .calendar-day {
    background: #1e1e1e !important;
}

.calendar-day.today {
    background: #252525;
}

.calendar-day.today .calendar-day-number {
    background: #667eea;
    color: white;
}

.calendar-day-number {
    font-size: 18px;
    font-weight: 700;
    color: #e0e0e0;
    padding: 8px 12px;
    background: #252525;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0;
    position: sticky;
    top: 45px; /* Position below the day header */
    z-index: 15;
    width: 100%;
}

.calendar-day.today .calendar-day-number {
    background: #667eea;
    color: white;
}

.calendar-time-labels-column {
    background: #252525;
    border-right: 1px solid #2a2a2a;
    position: sticky;
    left: 0;
    z-index: 15;
    height: 1440px; /* Match grid height */
    display: flex;
    flex-direction: column;
}

.calendar-time-label {
    height: 60px; /* 1 hour = 60px (1px per minute) */
    padding: 4px 8px;
    font-size: 10px;
    color: #888;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
    position: relative;
    flex-shrink: 0;
}

.calendar-time-label::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-bottom: 1px solid #333;
}

.calendar-time-grid {
    flex: 1;
    position: relative;
    min-height: 1440px; /* 24 hours * 60 minutes = 1440px, 1px per minute */
    background-image: 
        /* Hour markers (darker) */
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 59px,
            #2a2a2a 59px,
            #2a2a2a 60px
        ),
        /* 15-minute markers (lighter) */
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 14px,
            rgba(42, 42, 42, 0.3) 14px,
            rgba(42, 42, 42, 0.3) 15px
        );
}

.calendar-activity {
    position: absolute;
    left: 2px;
    right: 2px;
    background: #4a5fc1;
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: move;
    border-left: 3px solid #667eea;
    transition: all 0.2s;
    overflow: hidden;
    z-index: 1;
    min-height: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.calendar-activity:hover {
    background: #5568d3;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

.calendar-activity.dragging-activity {
    z-index: 1000 !important;
    pointer-events: auto;
}

/* When dragging, make non-dragged activities non-interactive */
body.dragging .calendar-activity:not(.dragging-activity) {
    pointer-events: none;
}

.calendar-activity.resizing {
    transition: none;
}

.activity-resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    cursor: ns-resize;
    background: rgba(102, 126, 234, 0.3);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    z-index: 3;
    transition: background 0.2s;
}

.activity-resize-handle:hover {
    background: rgba(102, 126, 234, 0.6);
}

.calendar-activity:hover .activity-resize-handle {
    background: rgba(102, 126, 234, 0.5);
}

/* Billable vs Non-Billable activity styling */
.calendar-activity.activity-billable {
    background: #10b981;
    border-left-color: #059669;
}

.calendar-activity.activity-billable:hover {
    background: #059669;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.calendar-activity.activity-nonbillable {
    background: #4a5fc1;
    border-left-color: #667eea;
}

.calendar-activity.activity-nonbillable:hover {
    background: #5568d3;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
    gap: 4px;
}

.activity-time {
    font-weight: 600;
    font-size: 10px;
    opacity: 0.9;
    flex: 1;
}

.activity-duration {
    font-weight: 600;
    font-size: 10px;
    opacity: 0.9;
    white-space: nowrap;
}

.activity-project {
    font-size: 10px;
    font-weight: 500;
    color: #a0a0ff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-subject {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Drop Indicator */
.drop-indicator {
    position: absolute;
    left: 2px;
    right: 2px;
    background: transparent !important;
    border: 2px dashed #667eea;
    border-radius: 4px;
    pointer-events: none;
    z-index: 9999;
    padding: 4px 6px;
    box-sizing: border-box;
    min-height: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.drop-indicator-time {
    font-weight: 600;
    font-size: 10px;
    color: #667eea;
    margin-bottom: 2px;
}

.drop-indicator-subject {
    font-size: 11px;
    color: #b0b0b0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-today {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #404040;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-today:hover {
    background: #404040;
    border-color: #505050;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
}

.context-menu-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    font-size: 13px;
    color: #e0e0e0;
}

.context-menu-item:hover {
    background: #333;
}

.context-menu-item:active {
    background: #3a3a3a;
}

.context-menu-icon {
    font-size: 14px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

/* Activity Details Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: #252525;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #404040;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #404040;
    background: #2a2a2a;
}

.modal-header h2 {
    color: #e0e0e0;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: #333;
    color: #e0e0e0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

.activity-detail-section:last-child {
    margin-bottom: 0;
}

.activity-detail-title {
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

.activity-detail-heading {
    color: #b0b0b0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.activity-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.activity-detail-row:last-child {
    border-bottom: none;
}

.activity-detail-label {
    color: #888;
    font-size: 13px;
    font-weight: 500;
    flex: 0 0 180px;
}

.activity-detail-value {
    color: #e0e0e0;
    font-size: 13px;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.activity-detail-content {
    margin-top: 8px;
}

.activity-content-field {
    margin-bottom: 16px;
}

.activity-content-field:last-child {
    margin-bottom: 0;
}

.activity-content-field strong {
    color: #b0b0b0;
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.activity-content-text {
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.6;
    padding: 12px;
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 1200px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .activity-detail-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .activity-detail-label {
        flex: none;
    }
    
    .activity-detail-value {
        text-align: left;
    }
}

/* Read-Only Mode Indicator */
.read-only-indicator {
    background: #ffa50088;
    border: 2px solid #ff8c00;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    text-align: center;
}

/* Read-Only State for Draggable Items */
.read-only {
    opacity: 0.7;
    cursor: not-allowed !important;
}

.read-only:hover {
    background-color: rgba(255, 165, 0, 0.1) !important;
}

.calendar-activity.read-only {
    border-left: 3px solid #888 !important;
}

.calendar-activity.read-only .activity-resize-handle {
    display: none;
}

/* Locked/Invoiced Activity State */
.calendar-activity.activity-locked {
    opacity: 0.6;
    cursor: not-allowed !important;
    border-left: 3px solid #dc2626 !important;
    position: relative;
}

.calendar-activity.activity-locked::before {
    content: '🔒';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    opacity: 0.8;
    z-index: 4;
}

.calendar-activity.activity-locked:hover {
    opacity: 0.7;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.calendar-activity.activity-locked .activity-resize-handle {
    display: none;
}

/* Override billable/nonbillable colors for locked activities */
.calendar-activity.activity-locked.activity-billable,
.calendar-activity.activity-locked.activity-nonbillable {
    background: #7f1d1d !important;
}

.calendar-activity.activity-locked.activity-billable:hover,
.calendar-activity.activity-locked.activity-nonbillable:hover {
    background: #991b1b !important;
}

/* Multi-day Activity Styling */
.calendar-activity.multi-day-activity {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-left: 4px solid !important;
}

/* Visual indicator for activities continuing from previous day */
.calendar-activity.continues-from-previous::before {
    content: '⬆';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    opacity: 0.8;
    line-height: 1;
}

/* Visual indicator for activities continuing to next day */
.calendar-activity.continues-to-next::after {
    content: '⬇';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    opacity: 0.8;
    line-height: 1;
}

