/* ============================================================
   COACTIVE IT SOLUTIONS - DAILY TASK TRACKER
   Corporate Theme
   ============================================================ */

:root {
    --primary: #1a3a5c;
    --primary-light: #2c5282;
    --primary-dark: #0f2440;
    --accent: #3182ce;
    --accent-light: #4299e1;
    --success: #38a169;
    --success-light: #48bb78;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --bg-light: #f7fafc;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.bg-navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    padding: 0.5rem 0;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.navbar-brand span { font-size: 1rem; }

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.notification-bell { position: relative; }
.notification-badge {
    font-size: 0.65rem !important;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    padding: 1.5rem 0;
    flex: 1;
}

.app-footer {
    background: #fff;
    border-top: 1px solid var(--border);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.breadcrumb-item a { color: var(--accent); text-decoration: none; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.stat-card {
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.08;
}

.stat-card.primary { border-left-color: var(--accent); }
.stat-card.primary::after { background: var(--accent); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.info { border-left-color: #4299e1; }
.stat-card.info::after { background: #4299e1; }

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.stat-card.primary .stat-icon { background: var(--accent); }
.stat-card.success .stat-icon { background: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning); }
.stat-card.danger .stat-icon { background: var(--danger); }
.stat-card.info .stat-icon { background: #4299e1; }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   SECTION CARDS
   ============================================================ */
.section-card {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.section-card .card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    font-weight: 600;
    padding: 0.85rem 1.25rem;
}

.section-card .card-header i { margin-right: 0.5rem; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #1a365d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}

.login-body-content { padding: 2rem; }
.login-footer {
    text-align: center;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
}

.btn-login {
    padding: 0.7rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    border: none;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(49,130,206,0.4);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border: none;
}

.table-modern thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table-modern thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.table-modern tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.table-modern tbody tr { transition: var(--transition); }
.table-modern tbody tr:hover { background: rgba(49,130,206,0.04); }

/* ============================================================
   FORM STYLES
   ============================================================ */
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49,130,206,0.15);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { border-radius: var(--radius-sm); font-weight: 500; transition: var(--transition); }
.btn:hover { transform: translateY(-1px); }

.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    border: none;
    color: #fff;
}
.btn-primary-custom:hover {
    box-shadow: 0 5px 15px rgba(49,130,206,0.3);
    color: #fff;
}

.btn-success-custom {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    border: none;
    color: #fff;
}
.btn-success-custom:hover { color: #fff; }

.btn-outline-action {
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.btn-outline-action:hover {
    background: var(--accent);
    color: #fff;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-weight: 500; font-size: 0.75rem; padding: 0.4em 0.8em; }

/* ============================================================
   SCORE DISPLAY
   ============================================================ */
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 6px solid;
    position: relative;
}

.score-circle.excellent { border-color: var(--success); color: var(--success); }
.score-circle.good { border-color: #4299e1; color: #4299e1; }
.score-circle.average { border-color: var(--warning); color: var(--warning); }
.score-circle.poor { border-color: var(--danger); color: var(--danger); }

.score-circle .score-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.score-circle .score-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ============================================================
   TASK CARD
   ============================================================ */
.task-card {
    border-left: 4px solid var(--accent);
    transition: var(--transition);
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-card.priority-urgent { border-left-color: var(--danger); }
.task-card.priority-high { border-left-color: var(--warning); }
.task-card.priority-medium { border-left-color: var(--accent); }
.task-card.priority-low { border-left-color: var(--text-secondary); }

.task-card.status-reviewed { opacity: 0.85; }

/* ============================================================
   PROGRESS BAR CUSTOM
   ============================================================ */
.progress-custom {
    height: 8px;
    border-radius: 10px;
    background: #edf2f7;
    overflow: hidden;
}

.progress-custom .progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.activity-timeline {
    position: relative;
    padding-left: 30px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item.success::before { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-item.warning::before { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.timeline-item.danger::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }

/* ============================================================
   ALERT BANNERS
   ============================================================ */
.alert-banner {
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
    border-left: 5px solid;
}

.alert-banner-info {
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    border-left-color: var(--accent);
    color: #1a365d;
}

.alert-banner-warning {
    background: linear-gradient(135deg, #fffff0 0%, #fefcbf 100%);
    border-left-color: var(--warning);
    color: #744210;
}

.alert-banner-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left-color: var(--danger);
    color: #742a2a;
    animation: banner-pulse 3s ease-in-out infinite;
}

.alert-banner-success {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-left-color: var(--success);
    color: #22543d;
}

@keyframes banner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); }
    50% { box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1); }
}

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    animation: dropdown-in 0.2s ease;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header .btn-close { filter: brightness(0) invert(1); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 1rem;
}

.empty-state h5 { color: var(--text-secondary); }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.page-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container-sm {
    position: relative;
    height: 200px;
    width: 100%;
}

/* ============================================================
   INTERNAL COMMENT (admin-only visibility indicator)
   ============================================================ */
.internal-comment {
    background: #fff5f5;
    border: 1px dashed var(--danger);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    position: relative;
}

.internal-comment::before {
    content: 'INTERNAL - Admin Only';
    position: absolute;
    top: -10px;
    left: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   CAPACITY / WORKDAY INDICATORS
   ============================================================ */
.capacity-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.capacity-bar .bar-track {
    flex: 1;
    height: 8px;
    background: #edf2f7;
    border-radius: 10px;
    overflow: hidden;
}

.capacity-bar .bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.capacity-bar .bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.workday-banner {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workday-banner.full { background: #f0fff4; border-left: 4px solid var(--success); }
.workday-banner.half { background: #fffff0; border-left: 4px solid var(--warning); }
.workday-banner.off { background: #f7fafc; border-left: 4px solid #a0aec0; }
.workday-banner.weekend_work { background: #ebf8ff; border-left: 4px solid #4299e1; }

.list-group-item.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
    border-color: transparent;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .stat-card .stat-value { font-size: 1.3rem; }
    .score-circle { width: 90px; height: 90px; }
    .score-circle .score-value { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .login-wrapper { max-width: 100%; }
    .login-header { padding: 1.5rem; }
    .login-body-content { padding: 1.5rem; }
}
