/* Modern Task Tracker - Minimalistic Design */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming - Minimalistic Color Palette */
:root {
    /* Minimalistic Color Palette - Blue & Purple Theme */
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    --secondary-color: #f8fafc;
    --accent-color: #7c3aed;
    --accent-light: #a855f7;
    
    /* Status Colors - Harmonized with blue/purple theme */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Text Colors - Consistent with theme */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows - Softer and more minimalistic */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent page scrolling */
}

/* ==========================================
   ENHANCED LOGIN PAGE STYLES
   ========================================== */

/* Login Body Specific Styles */
.login-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* Animated Background */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #4834d4, #686de0);
    top: 70%;
    left: 80%;
    animation-delay: -7s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #00d2d3, #54a0ff);
    top: 20%;
    right: 20%;
    animation-delay: -14s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #ff9ff3, #f368e0);
    bottom: 20%;
    left: 20%;
    animation-delay: -3s;
}

.shape-5 {
    width: 140px;
    height: 140px;
    background: linear-gradient(45deg, #feca57, #ff9f43);
    top: 50%;
    right: 10%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
        opacity: 0.2;
    }
    66% {
        transform: translateY(30px) rotate(240deg);
        opacity: 0.1;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.1;
    }
}

/* Login Wrapper */
.login-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    max-width: 480px;
    width: 100%;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Brand Section */
.brand-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.brand-icon {
    margin-bottom: 2rem;
}

.brand-logo {
    max-width: 200px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.brand-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.temp-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.temp-logo i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.025em;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: cardSlideIn 1s ease-out 0.3s both;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Enhanced Google Sign-In Button */
.google-signin-btn {
    width: 100%;
    height: 56px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    margin-bottom: 1.5rem;
}

.google-signin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.google-signin-btn:hover::before {
    left: 100%;
}

.google-signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-color);
}

.google-signin-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

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

.google-signin-btn:disabled:hover {
    transform: none;
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn-content,
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    position: relative;
    z-index: 1;
}

.btn-loading {
    display: none;
}

.google-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.btn-text {
    font-size: 1rem;
    font-weight: 500;
    color: #3c4043;
    letter-spacing: 0.25px;
}

.btn-loading span {
    font-size: 1rem;
    font-weight: 500;
    color: #3c4043;
    margin-left: 8px;
}

.btn-loading i {
    color: var(--primary-color);
}

/* Error Message */
.error-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    animation: errorSlideIn 0.3s ease-out;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
}

.error-content i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Security Notice */
.security-notice {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.1);
    border-radius: 16px;
    margin-bottom: 1rem;
}

.notice-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.notice-content {
    flex: 1;
}

.notice-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.notice-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    animation: fadeIn 1.5s ease-out;
}

.login-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.footer-link i {
    font-size: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design for Login */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 1rem;
    }
    
    .brand-section {
        margin-bottom: 2rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .brand-logo {
        max-width: 160px;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 0.75rem;
    }
    
    .brand-title {
        font-size: 1.75rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .security-notice {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .notice-title {
        font-size: 0.8rem;
    }
    
    .notice-text {
        font-size: 0.75rem;
    }
    
    .brand-logo {
        max-width: 140px;
        padding: 0.5rem 0.75rem;
    }
}

/* Keep existing styles for main app */

/* Container and layout */
.container-fluid {
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Minimalistic Header styling */
header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    flex-shrink: 0; /* Prevent header from shrinking */
    z-index: 100;
}

header .container {
    position: relative;
    z-index: 1;
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* Minimalistic User Section Styling */
.user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: transparent;
}

.header-link:hover {
    color: var(--primary-color);
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.header-link i {
    font-size: 1.1rem;
}

.toggle-completed-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.8rem;
}

.toggle-completed-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

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

.toggle-completed-btn i {
    font-size: 0.75rem;
}

.toggle-completed-btn.hide-completed {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toggle-completed-btn.hide-completed:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.user-section:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--border-light);
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.user-section:hover .user-avatar {
    border-color: var(--primary-color);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    color: var(--text-muted);
    font-size: 14px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.avatar-image:not([src=""]) + .avatar-fallback {
    opacity: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.user-email {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.logout-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    border-radius: var(--radius-md);
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.logout-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.logout-btn i {
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-section {
        gap: 0.75rem;
    }
    
    .user-name {
        font-size: 0.8rem;
        max-width: 140px;
    }
    
    .user-email {
        font-size: 0.7rem;
        max-width: 140px;
    }
    
    .logout-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .user-details {
        display: none;
    }
    
    .user-section {
        gap: 0.5rem;
    }
    
    .logout-btn span {
        display: none;
    }
    
    .logout-btn {
        padding: 0.5rem;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
    
    .toggle-completed-btn span {
        display: none;
    }
    
    .toggle-completed-btn {
        padding: 0.5rem;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}

@keyframes oldFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Main content area */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Main content container - flex grow to fill remaining space */
.container:not(header .container) {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    overflow: hidden; /* Prevent overflow from this container */
}

/* Minimalistic Card styling for main content */
.main-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Enhanced Tab styling */
.nav-tabs {
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    padding: 1.25rem 2rem;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-right: 0;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.nav-tabs .nav-link:first-child {
    padding-left: 2rem;
}

.nav-tabs .nav-link:last-child {
    padding-right: 2rem;
}

.nav-tabs .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #fff, #f0f9ff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px 2px 0 0;
}

.nav-tabs .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-tabs .nav-link:hover::before {
    width: 80%;
}

.nav-tabs .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.nav-tabs .nav-link.active::before {
    width: 100%;
}

.nav-tabs .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.nav-tabs .nav-link:hover i {
    transform: scale(1.1);
}

/* Tab content */
.tab-content {
    background: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 2rem;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section headers */
.tab-pane h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    position: relative;
}

.tab-pane h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Search bar styling */
.input-group {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.input-group-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    font-weight: 500;
}

.form-control {
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 400;
}

.form-control:focus {
    box-shadow: none;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Table styling */
.table-responsive {
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background: white;
    position: relative;
    z-index: 1;
    /* Ensure proper scrolling behavior */
    scroll-behavior: smooth;
}

.table {
    margin: 0;
    background: white;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Fixed table header */
.table thead {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Scrollable table body */
.table tbody {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    max-height: calc(100vh - 280px); /* Adjusted height to ensure last row is visible */
    min-height: 200px; /* Minimum height to show scrollbar */
    padding-bottom: 20px; /* Add padding to ensure last row is fully visible */
    /* Ensure smooth scrolling and proper scrollbar behavior */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Ensure last row is always accessible */
    scroll-padding-bottom: 20px;
    /* Force scrollbar to show when needed */
    scrollbar-width: auto;
    scrollbar-color: var(--border-color) transparent;
}

/* Ensure rows display properly in the flexbox layout */
.table thead tr,
.table tbody tr {
    display: flex;
    width: 100%;
}

.table thead tr {
    border-bottom: none;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1rem;
    border: none;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}



.table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
    transform: none;
    box-shadow: none;
}

.table tbody tr:last-child {
    border-bottom: none;
    margin-bottom: 10px; /* Ensure last row has space below */
}

.table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border: none;
    font-weight: 400;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Options column - Updated for flex layout */
.options-cell {
    flex: 2;
    min-width: 240px;
    white-space: nowrap;
    padding: 0.75rem;
    justify-content: center;
}

/* Options column header */
thead .options-cell {
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
}

.options-group {
    display: inline-flex;
    gap: 0.375rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.option {
    display: flex;
    align-items: center;
}

/* Uniform compact option buttons - simplified shadows */
.option-btn, .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: 36px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 0 0.75rem;
    white-space: nowrap;
}

.option-btn:hover, .chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.option-btn i, .chip i {
    font-size: 0.8rem;
}

/* Show text for Linear and Details buttons, hide for Subscribe */
.option-btn span {
    display: inline;
    font-size: 0.8rem;
}

.chip span {
    display: none;
}

/* Make subscription button icon-only */
.chip {
    width: 36px;
    padding: 0;
    gap: 0;
}

/* Consistent styling for all option buttons */
.option-btn:not(.disabled):not(.chip) {
    background: white;
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.option-btn:not(.disabled):not(.chip):hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Details button - same consistent styling */
.option-btn.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.option-btn.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* Disabled state */
.option-btn.disabled {
    background: var(--border-light);
    color: var(--text-muted);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.option-btn.disabled:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: var(--border-light);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Subscription chip states */
.chip {
    color: var(--text-secondary);
    border-color: var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chip:hover {
    background: var(--border-light);
    color: var(--text-primary);
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Subscribed state */
.chip-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chip-success:hover {
    background: #38a169;
    border-color: #38a169;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .options-cell {
        width: 220px;
        min-width: 220px;
    }
    
    .options-group {
        gap: 0.25rem;
    }
    
    .option-btn {
        height: 32px;
        font-size: 0.75rem;
        padding: 0 0.6rem;
    }
    
    .option-btn i, .chip i {
        font-size: 0.75rem;
    }
    
    .chip {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .options-cell {
        width: 200px;
        min-width: 200px;
        padding: 0.5rem;
    }
    
    .options-group {
        gap: 0.25rem;
        flex-direction: row;
    }
    
    .option-btn {
        height: 28px;
        font-size: 0.7rem;
        padding: 0 0.5rem;
    }
    
    .option-btn span {
        font-size: 0.7rem;
    }
    
    .chip {
        width: 28px;
        height: 28px;
    }
}

/* Sortable columns */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.sortable:hover {
    background: var(--primary-dark);
    color: white !important;
}

.sortable i {
    transition: transform 0.2s ease;
    opacity: 0.8;
}

.sortable:hover i {
    opacity: 1;
    color: white;
}

.sortable.sort-asc i {
    transform: rotate(180deg);
    color: white;
}

.sortable.sort-desc i {
    transform: rotate(0deg);
    color: white;
}

/* Button styling */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Enhanced table cell styling - Updated for flex layout */
.task-name-cell {
    flex: 3;
    min-width: 250px;
}

.type-cell {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.status-cell {
    flex: 1;
    min-width: 80px;
    justify-content: center;
}

.linear-task-cell {
    justify-content: center;
    flex: 1;
    min-width: 100px;
}

.start-date-cell {
    flex: 1;
    min-width: 110px;
}

.delivery-date-cell {
    flex: 1;
    min-width: 110px;
}

.actions-cell {
    justify-content: center;
    flex: 2;
    min-width: 200px;
}

.task-name-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.task-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.task-text {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
    font-size: 14px;
}

/* Table status badges - flat badge style */
.table-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
}

.table-status-badge i {
    font-size: 0.65rem;
}

.status-text {
    font-size: 0.65rem;
    line-height: 1;
}

/* Status badge colors - flat style */
.table-status-badge.status-backlog {
    background: rgba(107, 114, 128, 0.15);
    color: #4b5563;
}

.table-status-badge.status-in-progress {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
}

.table-status-badge.status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.table-status-badge.status-blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.table-status-badge.status-review {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

/* Type badges - flat badge style */
.table-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
}

.table-type-badge i {
    font-size: 0.65rem;
}

.type-text {
    font-size: 0.65rem;
    line-height: 1;
}

.table-type-badge.type-change {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
}

.table-type-badge.type-integration {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.linear-task-cell {
    text-align: center;
}

.task-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-width: 80px;
    justify-content: center;
}

.task-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.1));
}

.no-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--border-light);
    border: 1px solid var(--border-color);
    min-width: 80px;
    justify-content: center;
}

.no-link i {
    color: var(--text-muted);
}

.date-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.date-icon {
    color: var(--accent-color);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.date-text {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.start-date-cell .date-icon {
    color: var(--warning-color);
}

.delivery-date-cell .date-icon {
    color: var(--success-color);
}

.actions-cell {
    text-align: center;
}

/* Table action button styling */
.table .btn {
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
}

.table .btn i {
    font-size: 0.875rem;
}

/* Hover effect for the details button */
.table .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Custom refresh button styling */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-refresh::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-refresh:hover::before {
    left: 100%;
}

.btn-refresh:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-refresh:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-refresh.refreshing {
    background: linear-gradient(135deg, var(--success-color), var(--accent-color));
    animation: pulse 1.5s ease-in-out infinite;
}

.btn-refresh i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.btn-refresh:hover i {
    transform: rotate(180deg);
}

.btn-refresh .btn-text {
    font-weight: 500;
    letter-spacing: 0.025em;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-sm);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
    }
}

/* Subtle table row hover effects */
.table tbody tr:hover .task-icon {
    transform: none;
    transition: transform 0.2s ease;
}

.table tbody tr:hover .date-icon {
    transform: none;
    transition: transform 0.2s ease;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .task-name-content {
        gap: 0.5rem;
    }
    
    .task-icon {
        font-size: 1rem;
    }
    
    .date-content {
        gap: 0.25rem;
    }
    
    .date-icon {
        font-size: 0.8rem;
    }
    
    .task-link,
    .no-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Link styling */
.task-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.task-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateX(2px);
}

/* Date cell styling */
.date-cell {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modal styling */
.modal-content {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    max-width: 800px;
    margin: 1.75rem auto;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
    background: white;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

/* Modal details layout */
.modal-details {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

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

.section-title {
    background: var(--secondary-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* Detail items in modal */
.detail-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
}

.detail-item:hover {
    background: var(--secondary-color);
}

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

.detail-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.detail-item:hover::before {
    opacity: 1;
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.detail-value {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-details {
        padding: 1rem;
    }
    
    .detail-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .detail-label {
        font-size: 0.8rem;
    }
    
    .detail-value {
        font-size: 0.85rem;
    }
    
    .section-title {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-pending {
    background: linear-gradient(135deg, var(--border-light), var(--border-color));
    color: var(--text-secondary);
}

.status-in-progress {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
}

.status-medium {
    background: linear-gradient(135deg, var(--info-color), #3182ce);
    color: white;
}

.status-strategic {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
}

.status-midsize {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.status-small {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
}

.status-large {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
    color: white;
}

.status-xl {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
    color: white;
}

.status-xxl {
    background: linear-gradient(135deg, var(--primary-light), #6b46c1);
    color: white;
}

.status-backlog {
    background: linear-gradient(135deg, var(--border-light), var(--border-color));
    color: var(--text-secondary);
}

/* Priority-based badge colors - Unified theme */
.status-priority-1 {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
}

.status-priority-2 {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
    color: white;
}

.status-priority-3 {
    background: linear-gradient(135deg, #ed8936, #c05621);
    color: white;
}

.status-priority-4 {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
    color: white;
}

.status-priority-5 {
    background: linear-gradient(135deg, #c53030, #9b2c2c);
    color: white;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.125em;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--text-muted);
}

/* Error notifications */
.alert {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
    color: white;
    border-left: 4px solid var(--danger-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .detail-value {
        text-align: left;
        max-width: 100%;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .header-brand {
        gap: 0.5rem;
    }
    
    .header-logo {
        height: 32px;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-tabs .nav-link i {
        display: none;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* Remove slide animation to prevent weird effects on updates */

/* Table Controls Container - Minimalistic */
.table-controls-container {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

/* Unified section wrapper for controls + table */
.table-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Make inner controls flush with the unified container */
.table-section .table-controls-container {
    background: white;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 0;
    flex-shrink: 0; /* Prevent controls from shrinking */
}

/* Make table edges align with the container corners */
.table-section .table-responsive {
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 250px); /* Adjusted height to ensure proper scrolling */
    min-height: 300px; /* Minimum height for the table container */
    overflow: hidden; /* Hide overflow from the container itself */
}

.search-filter-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Search Input Styling - Minimalistic */
.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.75rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* Filter Dropdown Trigger - Minimalistic */
.filter-dropdown-wrapper {
    position: relative;
    z-index: 10000;
}

.filter-trigger-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-trigger-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.filter-trigger-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-trigger-btn .chevron {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.filter-trigger-btn.active .chevron {
    transform: rotate(180deg);
}

/* Filter Dropdown */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 280px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.filter-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-content {
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 1.25rem;
}

.filter-section:last-of-type {
    margin-bottom: 0;
}

.filter-section-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Filter Actions */
.filter-actions {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.clear-filters-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-md);
    color: var(--danger-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    justify-content: center;
}

.clear-filters-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
}

/* Refresh Button - Minimalistic */
.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.8rem;
}

.refresh-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.refresh-btn.refreshing {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.refresh-btn i {
    font-size: 0.75rem;
}

.refresh-btn .btn-text {
    font-size: 0.8rem;
}

/* Active Filters Display */
.active-filters {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.active-filters-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-chip-remove {
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.filter-chip-remove:hover {
    opacity: 1;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        height: auto; /* Allow content to determine height on mobile */
        overflow: auto;
    }
    
    .container:not(header .container) {
        padding: 0.5rem;
    }
    
    .search-filter-section {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-input-wrapper {
        max-width: none;
        width: 100%;
    }
    
    .controls-group {
        justify-content: space-between;
        width: 100%;
    }
    
    .filter-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        z-index: 1050;
        right: auto;
        left: 50%;
    }
    
    /* Adjust table controls padding on mobile */
    .table-controls-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    /* Mobile table improvements */
    .table-responsive {
        border: none;
        border-radius: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        font-size: 0.875rem;
        min-width: 600px; /* Ensure horizontal scroll on mobile */
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        vertical-align: middle;
        white-space: nowrap;
    }
    
    /* Mobile header improvements */
    .header-brand {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .header-title {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .user-section {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .header-actions {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
    }
    
    /* Mobile button improvements */
    .filter-trigger-btn,
    .refresh-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .filter-trigger-btn span,
    .refresh-btn .btn-text {
        display: inline;
    }
    
    /* Mobile main card adjustments */
    .main-card {
        margin: 0.5rem 0;
        padding: 1rem;
        border-radius: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container:not(header .container) {
        padding: 0.25rem;
    }
    
    .controls-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-trigger-btn,
    .refresh-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .filter-dropdown {
        width: 95vw;
        max-width: none;
        left: 2.5vw;
        transform: translateX(-2.5vw);
    }
    
    /* Ensure table maintains scrollability on small screens */
    .table-section .table-responsive {
        min-height: 200px;
        margin: 0 -0.25rem;
    }
    
    .table tbody {
        max-height: calc(100vh - 300px);
        min-height: 200px;
    }
    
    /* Very small screen adjustments */
    .header-title {
        font-size: 1.1rem;
    }
    
    .user-name {
        font-size: 0.875rem;
    }
    
    .user-email {
        font-size: 0.75rem;
    }
    
    .main-card {
        margin: 0.25rem 0;
        padding: 0.75rem;
    }
    
    .table-controls-container {
        padding: 0.75rem;
    }
}

/* Mobile-first table improvements */
@media (max-width: 576px) {
    /* Hide table on mobile and show cards instead */
    .table-responsive {
        display: none;
    }
    
    /* Show mobile cards container */
    .mobile-cards-container {
        display: block;
        max-height: calc(100vh - 300px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 3rem;
    }
    
    /* Mobile-friendly filter chips */
    .filter-chips {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-chip {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Mobile modal improvements */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
    
    /* Mobile search improvements */
    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Mobile filter improvements */
    .filter-select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.5rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    .container:not(header .container) {
        padding: 0.125rem;
    }
    
    .main-card {
        margin: 0.125rem 0;
        padding: 0.5rem;
    }
    
    .table-controls-container {
        padding: 0.5rem;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .user-email {
        font-size: 0.7rem;
    }
    
    .filter-trigger-btn,
    .refresh-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .search-input {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    /* Improve touch targets */
    .option-btn,
    .filter-trigger-btn,
    .refresh-btn,
    .clear-filters-btn {
        min-height: 44px; /* iOS recommended minimum touch target */
        min-width: 44px;
    }
    
    /* Better touch scrolling */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar on mobile */
    }
    
    .table-responsive::-webkit-scrollbar {
        display: none; /* Hide scrollbar on webkit mobile */
    }
    
    /* Mobile-friendly hover states */
    .table tbody tr:hover {
        background-color: rgba(79, 70, 229, 0.05);
    }
    
    /* Mobile-friendly focus states */
    .search-input:focus,
    .filter-select:focus,
    .option-btn:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    /* Mobile-friendly active states */
    .option-btn:active,
    .filter-trigger-btn:active,
    .refresh-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Mobile-friendly table row selection */
    .table tbody tr {
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .table tbody tr:active {
        background-color: rgba(79, 70, 229, 0.1);
    }
    
    /* Mobile-friendly filter dropdown */
    .filter-dropdown {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border-color);
    }
    
    /* Mobile-friendly search input */
    .search-input-wrapper {
        position: relative;
    }
    
    .search-input {
        border-radius: 25px;
        padding-left: 2.5rem;
        padding-right: 1rem;
    }
    
    .search-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        z-index: 1;
    }
    
    /* Mobile table improvements */
    .table {
        border-collapse: collapse;
    }
    
    .table th,
    .table td {
        border: 1px solid var(--border-light);
    }
    
    /* Mobile-friendly table headers */
    .table thead th {
        position: sticky;
        top: 0;
        background: var(--secondary-color);
        z-index: 10;
        font-weight: 600;
        text-align: center;
    }
    
    /* Mobile-friendly table cells */
    .table tbody td {
        text-align: center;
        vertical-align: middle;
    }
    
    /* Mobile-friendly status badges */
    .table-status-badge,
    .table-type-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Mobile-friendly options */
    .options-cell {
        text-align: center;
    }
    
    .options-group {
        display: flex;
        justify-content: center;
        gap: 0.25rem;
    }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .header-brand {
        flex-direction: row;
        gap: 1rem;
    }
    
    .user-section {
        flex-direction: row;
        gap: 1rem;
    }
    
    .search-filter-section {
        flex-direction: row;
        gap: 1rem;
    }
    
    .controls-group {
        flex-direction: row;
        gap: 1rem;
    }
}

/* Mobile Cards Layout */
.mobile-cards-container {
    display: none; /* Hidden by default, shown on mobile */
    padding: 0.5rem;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: auto;
    scrollbar-color: var(--border-color) transparent;
}

/* Ensure mobile cards are hidden on desktop */
@media (min-width: 577px) {
    .mobile-cards-container {
        display: none !important;
    }
}

/* Custom scrollbar for mobile cards container */
.mobile-cards-container::-webkit-scrollbar {
    width: 6px;
}

.mobile-cards-container::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-cards-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.mobile-cards-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.mobile-task-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.mobile-task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

    .mobile-task-card:last-child {
        margin-bottom: 0;
        padding-bottom: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Ensure proper spacing for mobile scrolling */
    .mobile-cards-container {
        padding-bottom: 3rem;
    }

.mobile-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.mobile-task-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
    margin-right: 0.5rem;
}

.mobile-task-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.mobile-task-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mobile-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.mobile-meta-label {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 60px;
}

.mobile-meta-value {
    color: var(--text-primary);
    font-weight: 400;
}

.mobile-task-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mobile-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.mobile-status-badge.status-backlog {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.mobile-status-badge.status-in-progress {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.mobile-status-badge.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.mobile-status-badge.status-blocked {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.mobile-status-badge.status-review {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.mobile-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.mobile-type-badge.type-change {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.mobile-type-badge.type-integration {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.mobile-task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.mobile-task-dates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mobile-date-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mobile-date-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mobile-task-buttons {
    display: flex;
    gap: 0.5rem;
}

.mobile-task-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mobile-task-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.mobile-task-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mobile-task-btn.primary:hover {
    background: var(--primary-dark);
}

.mobile-task-btn.danger {
    background: white;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.mobile-task-btn.danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Mobile cards responsive adjustments */
@media (max-width: 480px) {
    .mobile-task-meta {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .mobile-task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mobile-task-title {
        margin-right: 0;
    }
    
    .mobile-task-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .mobile-task-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .mobile-task-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Glass morphism effect for cards */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Custom scrollbar - Subtle cool gray design */
.table tbody::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table tbody::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 4px;
}

.table tbody::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.table tbody::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.5);
}

/* Firefox scrollbar - Subtle gray */
.table tbody {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.3) rgba(148, 163, 184, 0.1);
}

/* Subscription Styles */
.subscription-cell {
    min-width: 180px;
    text-align: center;
}

.subscription-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.subscription-status.subscribed {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.subscription-status.not-subscribed {
    background: rgba(160, 174, 192, 0.1);
    border: 1px solid rgba(160, 174, 192, 0.2);
}

.subscription-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.subscription-status.subscribed .subscription-text {
    color: var(--success-color);
}

.subscription-status.not-subscribed .subscription-text {
    color: var(--text-muted);
}

.subscription-status .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.subscription-status .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.subscription-status.subscribed .btn-outline-danger:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.subscription-status.not-subscribed .btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Responsive subscription styles */
@media (max-width: 768px) {
    .subscription-cell {
        min-width: 140px;
    }
    
    .subscription-status {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    
    .subscription-text {
        font-size: 0.75rem;
    }
    
    .subscription-status .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
} 