/* ============================================================
   TeamTracker - Main Stylesheet
   Design System: Dark glassmorphism with indigo (#6366f1) accent
   Loads AFTER Bootstrap 5 to override default component styles
   ============================================================ */

/* ----- CSS Reset & Base ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1f2c 0%, #2d1f3d 50%, #1a2a3c 100%);
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.6;
}

/* ----- Navigation ----- */
.navbar {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    width: 100%;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    margin-right: auto;
}

.navbar-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.navbar-brand span {
    color: #6366f1;
}

/* ----- Hamburger Button ----- */
.navbar-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 210;
    flex-shrink: 0;
}

.navbar-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.navbar-burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-burger.active span:nth-child(2) {
    opacity: 0;
}

.navbar-burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ----- Burger Slide-out Menu ----- */
.burger-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(18, 22, 34, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4.5rem 0 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.burger-menu.open {
    transform: translateX(0);
}

.burger-menu-header {
    padding: 0 1.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
}

.burger-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.burger-menu a:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #ffffff;
}

.burger-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.5rem 1.25rem;
}

.burger-menu-logout {
    color: #ef4444 !important;
}

.burger-menu-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.burger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 190;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.burger-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ----- My Tasks Nav Link ----- */
.navbar-tasks-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.navbar-tasks-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* ----- Profile Avatar ----- */
.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.profile-avatar:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.avatar-initials {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    user-select: none;
}

/* ----- Profile Dropdown ----- */
.profile-dropdown {
    position: fixed;
    top: 52px;
    right: 1.25rem;
    min-width: 240px;
    background: rgba(22, 27, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 200;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
}

.profile-dropdown-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.profile-email {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.25rem 0;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.profile-dropdown a:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #ffffff;
}

.profile-logout {
    color: #ef4444 !important;
}

.profile-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Unauthenticated nav */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-nav {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-nav-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border: none;
}

.btn-nav-primary:hover {
    background: linear-gradient(135deg, #5558e6, #7c4fe0);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

/* ----- Main Content ----- */
.main-content {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Dashboard overrides — full-width, top-aligned */
.main-content:has(.dashboard-container) {
    align-items: flex-start;
    justify-content: stretch;
    padding: 1rem 0 0;
}

/* ----- Card Container ----- */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(10px);
}

.card-wide {
    max-width: 600px;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* ----- Forms ----- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-link {
    background: none;
    border: none;
    color: #6366f1;
    padding: 0;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
    color: #8b5cf6;
}

/* ----- Alerts ----- */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

/* ----- Status Badges ----- */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-trial,
.status-trial_active,
.status-trial_expiring {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-expired,
.status-trial_expired {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.status-suspended,
.status-payment_overdue {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* ----- Footer (4-column layout) ----- */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem 2rem 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-brand span {
    color: #6366f1;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-column h4 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.4rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.25rem;
}

/* ----- Utilities ----- */
.text-center {
    text-align: center;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .navbar-content {
        padding: 0.5rem 0.75rem;
    }

    .navbar-tasks-link {
        font-size: 0.82rem;
        padding: 0.35rem 0.6rem;
    }

    .burger-menu {
        width: 260px;
    }

    .profile-dropdown {
        right: 0.75rem;
        min-width: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}