/* ==========================================================================
   TIMESHEET - Component Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Left Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform var(--transition-normal);
    z-index: 40;
}

.sidebar-header {
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    border: 1px solid var(--accent-green-border);
    color: var(--accent-green);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.18);
}

.brand-info {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-version {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.sidebar-nav {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 13.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    user-select: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-subtle);
}

.nav-link.active {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-highlight);
    font-weight: 600;
}

.nav-link.active svg {
    stroke: var(--accent-green);
}

.nav-link .chevron {
    margin-left: auto;
    width: 14px;
    height: 14px;
    opacity: 0.6;
    transition: transform var(--transition-fast);
}

/* --------------------------------------------------------------------------
   2. Top Navigation Bar
   -------------------------------------------------------------------------- */
.top-navbar {
    height: 70px;
    padding: 0 30px;
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.top-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.top-tab-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.top-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.top-tab-btn.active {
    color: var(--text-primary);
    font-weight: 600;
}

.top-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 14px;
    right: 14px;
    height: 2.5px;
    background-color: var(--accent-green);
    border-radius: var(--radius-full);
    box-shadow: 0 0 8px var(--accent-green);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    width: 240px;
}

.search-box input {
    width: 100%;
    height: 38px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px 0 34px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--accent-green);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    stroke: var(--text-muted);
    fill: none;
    pointer-events: none;
}

.btn-icon-round {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.btn-icon-round:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-icon-round .dot-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-red);
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 6px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.profile-pill:hover {
    border-color: var(--accent-green-border);
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-dropdown-menu {
    position: absolute;
    top: 65px;
    right: 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    min-width: 230px;
    padding: 14px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-user-info {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
    font-size: 12.5px;
}

.dropdown-user-email {
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}


/* --------------------------------------------------------------------------
   3. Cards & Panels
   -------------------------------------------------------------------------- */
.panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-fast);
}

.panel-card:hover {
    border-color: var(--border-highlight);
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 400;
}

.menu-dots {
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    line-height: 1;
    font-size: 16px;
}

.menu-dots:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-subtle);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
    user-select: none;
}

.btn-green {
    background-color: var(--accent-green);
    color: #0b2214;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.btn-green:hover {
    background-color: #2ed66b;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.38);
    transform: translateY(-1px);
}

.btn-green:active {
    transform: translateY(0);
}

.btn-dark {
    background-color: #21242d;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-dark:hover {
    background-color: #282c37;
    border-color: #3b4050;
}

.btn-danger {
    background-color: var(--accent-red-bg);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   5. Badges & Status Pills
   -------------------------------------------------------------------------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: capitalize;
}

.status-pill.running {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-pill.running::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 1.8s infinite;
}

.status-pill.active {
    background-color: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-pill.completed {
    background-color: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* --------------------------------------------------------------------------
   6. Progress Bars
   -------------------------------------------------------------------------- */
.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background-color: #121317;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #15803d, #22c55e);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar-fill.orange {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* --------------------------------------------------------------------------
   7. Tables
   -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.modern-table th {
    padding: 10px 14px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modern-table td {
    padding: 12px 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.modern-table tr:hover td {
    background-color: var(--bg-hover);
}

/* --------------------------------------------------------------------------
   8. Form Inputs
   -------------------------------------------------------------------------- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select {
    width: 100%;
    height: 38px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px;
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px var(--accent-green-bg);
}

/* --------------------------------------------------------------------------
   9. Modals & Overlays
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(7, 8, 11, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    padding: 28px;
    box-shadow: var(--shadow-modal);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   10. Auth Screen
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   10. Auth Screen & Author Presentation
   -------------------------------------------------------------------------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 20%, #152219 0%, var(--bg-base) 75%);
    padding: 30px 20px;
}

.auth-container {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
    align-items: stretch;
}

/* Left Showcase Panel: About App & Author */
.auth-showcase-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-modal);
    position: relative;
    overflow: hidden;
}

.auth-showcase-panel::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: var(--accent-green-glow);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.6;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.auth-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-feature-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.auth-feature-icon {
    font-size: 15px;
}

/* Author Portfolio Card (Jusuf Skopljak) */
.auth-author-card {
    padding: 16px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.author-avatar {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px var(--accent-green-glow);
}

.author-info-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.author-info-role {
    font-size: 11.5px;
    color: var(--accent-green);
    font-weight: 600;
}

.author-info-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.4;
}

/* Right Auth Form Card */
.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo-badge {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.05));
    border: 1px solid var(--accent-green-border);
    color: var(--accent-green);
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Auth and App Footer Bars */
.auth-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 12.5px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 30px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
    color: var(--text-muted);
    font-size: 12.5px;
    flex-wrap: wrap;
    gap: 14px;
}

/* Social links (GitHub, LinkedIn) */
.footer-social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 5;
    user-select: none;
}

.footer-social-link svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.footer-social-link span {
    pointer-events: none;
}

.footer-social-link:hover {
    color: var(--text-primary);
    border-color: var(--accent-green-border);
    background: var(--accent-green-bg);
    transform: translateY(-1px);
}

.footer-social-link:hover svg {
    transform: scale(1.1);
}

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.sync-status svg {
    width: 15px;
    height: 15px;
    stroke: var(--accent-green);
}

@media (max-width: 860px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }
    .auth-showcase-panel {
        padding: 24px;
    }
    .auth-features-list {
        grid-template-columns: 1fr;
    }
    .auth-footer-bar {
        flex-direction: column;
        text-align: center;
    }
    .app-footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

.sync-status.syncing svg {
    animation: spin 1s linear infinite;
}

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

/* Mobile Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
    }
    .sidebar.open {
        transform: translateX(260px);
    }
    .mobile-menu-btn {
        display: block;
    }
    .top-tabs {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   12. Interactive Calendar
   -------------------------------------------------------------------------- */
.calendar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

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

.calendar-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.calendar-grid-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day-cell {
    aspect-ratio: 1.1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cal-day-cell:hover {
    border-color: var(--accent-green-border);
    background: var(--bg-card-subtle);
    color: var(--text-primary);
}

.cal-day-empty {
    visibility: hidden;
    pointer-events: none;
}

.cal-day-today {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.cal-day-selected {
    outline: 2px solid var(--accent-green);
}

.cal-day-worked {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

.cal-work-badge {
    background: #15803d;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.cal-reminder-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 11px;
}

