:root {
    --bg-dark: #0d0d12;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --primary: #3b82f6;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    /* Extra padding at bottom so scroll doesn't get hidden behind bottom nav! */
    padding-bottom: 80px; 
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TOP NAV */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(13, 13, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.network-status {
    font-size: 0.85rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

/* DASHBOARD & PANELS */
.dashboard {
    padding: 20px;
    flex-grow: 1;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
}

h2 {
    font-weight: 500;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.voice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.helper-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* AUDIO VISUALIZER */
.audio-visualizer {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    opacity: 0.3;
}
.audio-visualizer.active {
    opacity: 1;
}

.bar {
    width: 6px;
    height: 10px;
    background: var(--danger);
    border-radius: 3px;
    transition: height 0.1s ease;
}

/* BUTTONS */
.action-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
}
.action-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}
.action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-light);
}

.glow-red:active { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
.glow-blue:active { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }

/* FORMS */
.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

input, textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    color: white;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
input:focus, textarea:focus {
    border-color: var(--primary);
}

/* SIGNATURE */
.signature-zone {
    margin-top: 20px;
    margin-bottom: 20px;
}
canvas {
    background: white;
    border-radius: 8px;
    width: 100%;
    touch-action: none; 
}
.sig-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}
.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(13, 13, 18, 0.95);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    width: 30%;
    transition: color 0.2s ease;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

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