:root {
    --primary: #4F46E5; /* Indigo 600 */
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary: #10B981; /* Emerald 500 */
    --accent: #F59E0B; /* Amber 500 */
    --danger: #EF4444;
    
    --bg-body: #F3F4F6;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --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-glow: 0 0 15px rgba(79, 70, 229, 0.3);

    --font-family: 'Outfit', sans-serif;
    --header-height: 60px;
    --nav-height: 70px;
}

/* High Contrast Mode Variables (toggleable via class on body) */
body.high-contrast {
    --primary: #0000FF;
    --secondary: #008000;
    --accent: #FFD700;
    --bg-body: #000000;
    --bg-card: #1A1A1A;
    --text-main: #FFFFFF;
    --text-muted: #DDDDDD;
    --border: #FFFFFF;
}

/* Large Text Mode (toggleable) */
body.large-text {
    font-size: 120%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* App-like feel */
}

#app {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-height) + 20px);
    position: relative;
    max-width: 600px; /* Constrain width on desktop */
    margin: 0 auto;
    width: 100%;
    background: var(--bg-body);
    box-shadow: 0 0 50px rgba(0,0,0,0.05);
}

/* Scrollbar hiding */
#app::-webkit-scrollbar {
    display: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { color: var(--text-muted); }

/* Components */
.header {
    padding: 20px;
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    gap: 8px;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    z-index: 100;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    max-width: 600px;
    margin: 0 auto;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    gap: 4px;
    cursor: pointer;
    width: 60px;
}

.nav-btn i {
    font-size: 1.25rem;
    transition: color 0.2s;
}

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

.nav-fab-wrapper {
    position: relative;
    top: -25px;
}

.nav-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 4px solid var(--bg-body);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}

.nav-fab:active {
    transform: scale(0.95);
}

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

.view-content {
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

/* Specific Page Styles */

/* Issue Card */
.issue-card {
    display: flex;
    gap: 16px;
}

.issue-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.issue-info {
    flex: 1;
}

.issue-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.issue-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 100px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { background: #FEF3C7; color: #D97706; }
.status-progress { background: #DBEAFE; color: #2563EB; }
.status-resolved { background: #D1FAE5; color: #059669; }

.meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    background: var(--bg-card);
    transition: border-color 0.2s;
}

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

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    margin: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    border: 3px solid var(--bg-card);
}

.timeline-item.active .timeline-dot {
    background: var(--primary);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    text-align: center;
    padding: 16px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

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