/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f06a6a;
    --secondary-color: #7de2d1;
    --danger-color: #e74c3c;
    --warning-color: #f4b942;
    --dark-color: #1d1f21;
    --light-color: #2d2f31;
    --sidebar-bg: #1d1f21;
    --content-bg: #1a1c1e;
    --card-bg: #25272a;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --border-color: #35383b;
    --sidebar-width: 260px;
    --header-height: 60px;
    --border-radius: 6px;
    --box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Bootstrap Modal Dark Theme Overrides */
.modal.show {
    display: block !important;
}

.modal-content {
    background-color: #2d2f31 !important;
    border-color: #35383b !important;
}

.modal-header,
.modal-footer {
    border-color: #35383b !important;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

.form-control:focus,
.form-select:focus {
    border-color: #f06a6a !important;
    box-shadow: 0 0 0 0.25rem rgba(240, 106, 106, 0.25) !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--content-bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--text-primary);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.nav-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 14px;
    margin: 2px 8px;
    border-radius: 6px;
}

.nav-item:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 500;
}

.nav-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Removed - moved to task-list.css */

/* Header */
.header {
    height: var(--header-height);
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.workspace-selector {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 13px;
}

/* Content Area */
.content {
    padding: 30px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Cards */
.card {
    background: transparent;
    border-radius: var(--border-radius);
    border: none;
    padding: 0;
    margin-bottom: 20px;
}

.card.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: #e05555;
    border-color: #e05555;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.w-100 {
    width: 100%;
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: var(--light-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-bg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--light-color) !important;
    color: var(--text-primary) !important;
    font-family: inherit;
    -webkit-text-fill-color: var(--text-primary) !important;
}

/* Fix autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--light-color) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary) !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    background: var(--card-bg) !important;
    box-shadow: 0 0 0 3px rgba(240, 106, 106, 0.1) !important;
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

/* Placeholder text color */
input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7;
}

textarea,
textarea.form-control {
    min-height: 80px;
    resize: vertical;
    color: var(--text-primary) !important;
    background: var(--light-color) !important;
}

select,
select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa0a6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
    color: var(--text-primary) !important;
    background-color: var(--light-color) !important;
}

/* Select options */
select option {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

input[type="color"].form-control {
    height: 40px;
    padding: 4px;
}

/* Disabled state */
input:disabled,
textarea:disabled,
select:disabled,
.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--text-secondary) !important;
    background-color: var(--dark-color) !important;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.table th,
.table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    background: transparent;
}

.table th {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    color: var(--text-primary);
}

.table tbody {
    background: transparent;
}

.table tbody tr {
    background: transparent;
}

.table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-pending {
    background: rgba(244, 185, 66, 0.15);
    color: #f4b942;
}

.badge-in-progress {
    background: rgba(106, 148, 255, 0.15);
    color: #6a94ff;
}

.badge-in_progress {
    background: rgba(106, 148, 255, 0.15);
    color: #6a94ff;
}

.badge-completed {
    background: rgba(125, 226, 209, 0.15);
    color: #7de2d1;
}

.badge-urgent {
    background: rgba(240, 106, 106, 0.15);
    color: #f06a6a;
}

.badge-high {
    background: rgba(255, 165, 76, 0.15);
    color: #ffa54c;
}

.badge-medium {
    background: rgba(244, 185, 66, 0.15);
    color: #f4b942;
}

.badge-low {
    background: rgba(125, 226, 209, 0.15);
    color: #7de2d1;
}

.badge-active {
    background: rgba(125, 226, 209, 0.15);
    color: #7de2d1;
}

.badge-planning, .badge-draft {
    background: rgba(154, 160, 166, 0.15);
    color: #9aa0a6;
}

.badge-on_hold, .badge-inactive, .badge-archived {
    background: rgba(154, 160, 166, 0.15);
    color: #9aa0a6;
}

.badge-cancelled {
    background: rgba(240, 106, 106, 0.15);
    color: #f06a6a;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue {
    background: #6a94ff;
}

.stat-icon.green {
    background: #7de2d1;
}

.stat-icon.orange {
    background: #ffa54c;
}

.stat-icon.purple {
    background: #a685ff;
}

.stat-details h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Tasks List */
.task-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s;
}

.task-item:hover {
    background: rgba(255,255,255,0.03);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-details {
    flex: 1;
}

.task-title {
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.task-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 15px;
}

/* Modal */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.75) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    backdrop-filter: blur(3px);
}

/* Show modal-overlay when Vue renders it (v-if/v-show) */
.modal-overlay[style*="display"],
.modal-overlay.active {
    display: flex !important;
}

.modal {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    max-width: 600px !important;
    width: 90% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8) !important;
    position: relative !important;
    z-index: 100000 !important;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Prevent background scroll when modal open */
body.modal-open {
    overflow: hidden;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-bg);
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    color: var(--text-secondary);
}

.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-danger {
    background: rgba(240, 106, 106, 0.1);
    color: #f06a6a;
    border: 1px solid rgba(240, 106, 106, 0.3);
}

.alert-success {
    background: rgba(125, 226, 209, 0.1);
    color: #7de2d1;
    border: 1px solid rgba(125, 226, 209, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 15px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

