/* ============================================
   KALSUR - Main Stylesheet
   Personal AI Assistant v2.0
   ============================================ */

/* === CSS VARIABLES === */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --surface: #16213e;
    --surface-elevated: #1f2937;
    --border: #374151;
    --border-light: #4b5563;
    
    /* Text */
    --text: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    /* Accent */
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-muted: rgba(99, 102, 241, 0.2);
    
    /* Status Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Category Colors */
    --cat-praca: #3B82F6;
    --cat-stajnia: #22C55E;
    --cat-rodzina: #EF4444;
    --cat-ulani: #F59E0B;
    --cat-dom: #8B5CF6;
    --cat-inne: #6B7280;
    
    /* Fonts */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    
    /* Gradient */
    --bg-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* === RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-display);
    background: var(--bg-gradient);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* === LAYOUT === */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-main {
    flex: 1;
    padding: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.app-footer {
    padding: var(--space-md);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-divider {
    margin: 0 var(--space-sm);
}

/* === HEADER === */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.header-nav {
    display: flex;
    gap: var(--space-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--accent-muted);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-muted);
}

.nav-icon {
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.notifications-wrapper {
    position: relative;
}

.notifications-btn {
    position: relative;
    padding: var(--space-sm);
    background: none;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notifications-btn:hover {
    background: var(--accent-muted);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background: #ef4444;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1000;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.notifications-header button {
    font-size: 0.8rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
}

.notifications-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--surface-elevated);
}

.notification-item.unread {
    background: var(--accent-muted);
}

.notification-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.empty-notifications {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
}

.logout-btn {
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    opacity: 0.7;
    transition: all 0.2s;
}

.logout-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.2);
}

/* === DASHBOARD === */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.quick-voice {
    display: flex;
    justify-content: center;
}

.voice-btn-large {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-2xl);
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.voice-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.voice-icon {
    font-size: 1.5rem;
}

/* === SECTIONS === */
.events-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 600;
}

.title-icon {
    font-size: 1.3rem;
}

.date-badge {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: var(--space-sm);
}

.section-link {
    color: var(--accent);
    font-size: 0.9rem;
}

.section-link:hover {
    text-decoration: underline;
}

/* === EVENT CARDS === */
.events-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.event-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.event-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.event-card.compact {
    padding: var(--space-sm) var(--space-md);
}

.event-time {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    min-width: 50px;
}

.event-time .no-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.event-content {
    flex: 1;
}

.event-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
}

.category-icon {
    font-size: 1.1rem;
}

.event-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.event-priority {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.priority-krytyczny {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.priority-wysoki {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.priority-normalny {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.priority-niski {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.travel-badge {
    margin-left: var(--space-xs);
}

/* === DATE DIVIDER === */
.date-divider {
    padding: var(--space-sm) 0;
    margin-top: var(--space-sm);
}

.divider-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state.small {
    padding: var(--space-lg);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-md);
}

.add-event-btn {
    display: inline-block;
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--accent-muted);
    color: var(--accent);
    border-radius: var(--radius-md);
}

.add-event-btn:hover {
    background: var(--accent);
    color: white;
}

/* === QUICK ADD === */
.quick-add {
    display: flex;
    justify-content: center;
}

.quick-add-btn {
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.2s;
}

.quick-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* === MODAL === */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--accent-muted);
    color: var(--text);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

/* === FORMS === */
.form-group {
    margin-bottom: var(--space-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
}

.form-actions-right {
    display: flex;
    gap: var(--space-md);
}

/* Form conflicts */
.form-conflicts {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
}

.form-conflict {
    padding: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.form-conflict.critical {
    color: #ef4444;
    font-weight: 500;
}

.form-conflict.warning {
    color: #f59e0b;
}

.form-conflict small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Textarea */
.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    resize: vertical;
    min-height: 60px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Checkbox label */
.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    margin-top: var(--space-md);
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* ========================
   SETTINGS PAGE
   ======================== */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-lg);
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border);
}

.settings-card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.settings-icon {
    font-size: 1.5rem;
}

.settings-card-body {
    padding: var(--space-lg);
}

.settings-description {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.settings-status {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.settings-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.settings-status.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.settings-status.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
}

.status-text strong {
    display: block;
    margin-bottom: var(--space-xs);
}

.status-text p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.status-text ol {
    margin: var(--space-sm) 0 0;
    padding-left: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.status-text ol li {
    margin-bottom: var(--space-xs);
}

.status-text code {
    background: var(--surface-elevated);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.settings-actions {
    display: flex;
    gap: var(--space-md);
}

.setting-row {
    margin-bottom: var(--space-lg);
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-weight: 500;
}

.setting-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.setting-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: var(--space-xs) 0 0 26px;
}

.setting-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    margin-top: var(--space-sm);
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.category-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
}

.category-icon {
    font-size: 1.2rem;
}

.category-name {
    flex: 1;
}

.category-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.about-info {
    color: var(--text-muted);
    line-height: 1.8;
}

.about-info ul {
    margin: var(--space-md) 0 0;
    padding-left: var(--space-lg);
}

/* Alerts */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Settings button in header */
.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: var(--surface-elevated);
    color: var(--text);
}

/* === BUTTONS === */
.btn-primary {
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: var(--space-sm) var(--space-lg);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

.btn-danger {
    padding: var(--space-sm) var(--space-lg);
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* === TOAST === */
#toast-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.toast.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === VOICE PAGE === */
.voice-page {
    max-width: 600px;
    margin: 0 auto;
}

.recording-section {
    text-align: center;
    padding: var(--space-2xl);
}

.recording-visual {
    position: relative;
    margin-bottom: var(--space-xl);
}

.recording-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 3px solid var(--border);
    border-radius: 50%;
    font-size: 3rem;
    transition: all 0.3s;
}

.recording-circle.active {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.recording-waves {
    display: none;
    justify-content: center;
    gap: 4px;
    margin-top: var(--space-md);
}

.recording-waves.active {
    display: flex;
}

.recording-waves span {
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
    animation: wave 0.5s ease-in-out infinite;
}

.recording-waves span:nth-child(2) { animation-delay: 0.1s; }
.recording-waves span:nth-child(3) { animation-delay: 0.2s; }
.recording-waves span:nth-child(4) { animation-delay: 0.3s; }
.recording-waves span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 20px; }
    50% { height: 40px; }
}

.recording-status {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.recording-timer {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--text);
    margin-bottom: var(--space-lg);
}

.record-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.record-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.record-btn.recording {
    background: var(--danger);
}

.recording-hint {
    margin-top: var(--space-lg);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === PROCESSING === */
.processing-section {
    text-align: center;
    padding: var(--space-2xl);
}

.processing-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-lg);
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-status {
    color: var(--text-muted);
}

/* === RESULT SECTION === */
.result-section,
.ai-result-section {
    padding: var(--space-lg);
}

.result-card,
.ai-result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.result-header,
.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.edit-btn {
    padding: var(--space-xs) var(--space-sm);
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.edit-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.transcription-display p {
    color: var(--text);
    line-height: 1.8;
}

.transcription-edit textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    resize: vertical;
    min-height: 100px;
}

.edit-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-md);
}

.result-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* === AI RESULT === */
.confidence-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.confidence-badge.high {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.confidence-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.confidence-badge.low {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.parsed-event {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.event-field {
    display: flex;
    gap: var(--space-md);
}

.field-label {
    color: var(--text-muted);
    min-width: 100px;
}

.field-value {
    color: var(--text);
    font-weight: 500;
}

.ai-warnings {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.warning-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.warning-item.info {
    background: rgba(59, 130, 246, 0.1);
}

/* === CONFLICTS DIALOG === */
.conflicts-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-top: var(--space-md);
}

.conflicts-alert h4 {
    color: #ef4444;
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.conflict-item {
    background: var(--surface);
    border-left: 4px solid var(--warning);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.conflict-item.critical {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.conflict-item.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.conflict-message {
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.conflict-suggestion {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.conflicts-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: flex-end;
}

.btn-warning {
    padding: var(--space-sm) var(--space-lg);
    background: #f59e0b;
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-warning:hover {
    background: #d97706;
}

/* === RECENT NOTES === */
.recent-notes {
    margin-top: var(--space-xl);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.note-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.note-item.clickable {
    cursor: pointer;
}

.note-item.clickable:hover {
    border-color: var(--accent);
    background: var(--surface-elevated);
    transform: translateX(4px);
}

.note-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--surface-elevated);
}

.note-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* === CALENDAR === */
.calendar-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.calendar-nav {
    display: flex;
    gap: var(--space-sm);
}

.period-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: capitalize;
}

.view-toggle {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.view-btn {
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--text);
    background: var(--surface-elevated);
}

.view-btn.active {
    background: var(--accent);
    color: white;
}

.nav-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: var(--accent);
    background: var(--surface-elevated);
}

.today-btn {
    background: var(--accent);
    border-color: var(--accent);
}

.today-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Day names row */
.calendar-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: var(--space-sm) 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Week view */
.calendar-grid.week-view .calendar-day {
    min-height: 200px;
}

/* Month view */
.calendar-grid.month-view .calendar-day {
    min-height: 100px;
}

.calendar-day {
    background: var(--surface);
    padding: var(--space-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: var(--surface-elevated);
}

.calendar-day.today {
    background: rgba(99, 102, 241, 0.1);
}

.calendar-day.weekend {
    background: rgba(107, 114, 128, 0.05);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.other-month:hover {
    opacity: 0.7;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

/* Week view header */
.week-view .day-header {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-sm);
}

/* Month view header - simpler */
.month-view .day-header {
    justify-content: flex-end;
}

.day-name {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.day-date {
    font-weight: 600;
    font-size: 0.9rem;
}

.day-date.today-badge {
    background: var(--accent);
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-event {
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.1s;
}

.calendar-event:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.calendar-event .event-time {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    opacity: 0.8;
}

.calendar-event .event-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event .travel-badge {
    font-size: 0.7rem;
}

.more-events {
    color: var(--accent);
    font-size: 0.7rem;
    text-align: center;
    padding: 2px;
    cursor: pointer;
}

.more-events:hover {
    text-decoration: underline;
}

.no-events {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: var(--space-sm);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    padding: var(--space-md);
    background: var(--surface);
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* === DETAIL MODAL === */
.detail-row {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    min-width: 100px;
}

.detail-value {
    color: var(--text);
}

.detail-notes {
    margin-top: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === UTILITIES === */
.hidden {
    display: none !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .nav-link span:not(.nav-icon) {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        min-height: auto;
    }
    
    .result-actions {
        flex-direction: column;
    }
}
