:root {
    /* Friendly Light Color Palette */
    --bg-primary: #f8fafb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-accent: #f0f4ff;

    --accent-primary: #5b7fff;
    --accent-secondary: #7c9aff;
    --accent-success: #22c55e;
    --accent-warning: #f59e0b;
    --accent-danger: #ff6b6b;

    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e0;

    /* Soft Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #5b7fff 0%, #7c9aff 100%);
    --gradient-bg: radial-gradient(circle at 20% 50%, rgba(91, 127, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 154, 255, 0.05) 0%, transparent 50%);

    /* Soft Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-image: var(--gradient-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

h2 {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* Container & Layout */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* Header */
.header {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
}

.header__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.header__icon {
    font-size: 2.5rem;
}

.header__subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.header__actions {
    margin-top: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-accent);
}

/* Delete Button */
.btn-delete {
    background: #fff1f0;
    border: 1px solid #ffd6d6;
    color: var(--accent-danger);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-delete:hover {
    background: #ffe0e0;
    border-color: var(--accent-danger);
    transform: scale(1.05);
}

.btn-delete:active {
    transform: scale(0.95);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Issue Card */
.issue-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.issue-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
}

.issue-card__header-content {
    flex: 1;
    min-width: 0;
}

.issue-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.issue-card__title:hover {
    color: var(--accent-primary);
}

.issue-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.issue-card__labels {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    white-space: nowrap;
}

.badge-open {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-closed {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.badge-unknown {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.badge-type {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.label-tag {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid;
}

/* Issues Container - Split Layout */
#issues-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

/* Type Section */
.type-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.type-section__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: var(--space-lg);
    z-index: 10;
}

.type-section__title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0;
}

.type-section__count {
    background: var(--bg-accent);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid #bfdbfe;
}

.type-section__categories {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Category Section */
.category-section {
    margin-bottom: 0;
}

.category-section__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
}

.category-section__title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
}

.category-section__count {
    background: var(--bg-accent);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.category-section__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Messages */
.message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideIn var(--transition-base);
}

.message-success {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.message-error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    gap: var(--space-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-state__icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state__title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    #issues-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .type-section__header {
        position: static;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .type-section__title {
        font-size: 1.5rem;
    }

    .container {
        padding: var(--space-md);
    }

    .header {
        padding: var(--space-lg) 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}