/* Agile Toolbox - Alter Template Inspired Design */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #0e1c29;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Color Variables */
:root {
    --primary-dark: #0e1c29;
    --primary-purple: #774be5;
    --primary-light: #d8dfe5;
    --accent-blue: #3b82f6;
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --background-tertiary: #f1f5f9;
    --text-primary: #0e1c29;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --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);
    --gradient-primary: linear-gradient(135deg, #774be5 0%, #3b82f6 100%);
    --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-align: center;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
}

p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.text-large {
    font-size: 1.25rem;
    line-height: 1.6;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-large {
    padding: 6rem 0;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

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

.login-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

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

.user-profile {
    position: relative;
    display: none;
}

.user-profile.active {
    display: block;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--background-primary);
    box-shadow: var(--shadow-sm);
}

.profile-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--background-secondary);
    color: var(--primary-purple);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.05em;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: var(--background-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(119, 75, 229, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.1em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.card {
    background: var(--background-primary);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-medium);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.6;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    line-height: 1.4;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--background-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

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

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary-purple);
}

/* Sidebar */
.sidebar {
    background: var(--background-primary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.sidebar-section {
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.sidebar-item {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-left-color: var(--primary-purple);
}

.sidebar-item.active {
    background: rgba(119, 75, 229, 0.1);
    color: var(--primary-purple);
    border-left-color: var(--primary-purple);
}

.sidebar-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: inherit;
}

.sidebar-item p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
    color: inherit;
}

/* Layout Structure */
.app-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    gap: 2rem;
}

.app-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.app-main {
    flex: 1;
    background: var(--background-primary);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.app-main-content {
    padding: 3rem;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.back-link:hover {
    transform: translateX(-4px);
    color: var(--text-primary);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: radial-gradient(circle at center, rgba(119, 75, 229, 0.05) 0%, transparent 70%);
    border-radius: 20px;
}

.page-header h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    padding-bottom: 0.1em;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--background-primary);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(119, 75, 229, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Controls Panel */
.controls {
    background: var(--background-secondary);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

.controls h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--background-primary);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
    padding-bottom: 0.05em;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Board Layout */
.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.column {
    background: var(--background-primary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.column-header {
    padding: 1.5rem;
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.column-header.start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.column-header.stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.column-header.continue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.column-content {
    padding: 1.5rem;
    min-height: 300px;
}

/* Items */
.item {
    background: var(--background-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-medium);
}

.item-text {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.item-votes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vote-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--primary-purple);
    background: var(--background-primary);
    color: var(--primary-purple);
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    background: var(--primary-purple);
    color: white;
}

.delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
}

/* Utility Classes */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .app-sidebar {
        width: 100%;
    }
    
    .app-main-content {
        padding: 2rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .page-header {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .board {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container,
    .app-layout {
        padding: 0.5rem;
    }
    
    .app-main-content {
        padding: 1.5rem;
    }
    
    .controls {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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