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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.content {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    background: #edf2f7;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    font-size: 14px;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.voice-recorder {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    margin: 15px 0;
}

.record-button {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.record-button:hover {
    transform: scale(1.05);
}

.record-button.recording {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.record-icon {
    width: 28px;
    height: 28px;
    background: #ef4444;
    border-radius: 50%;
}

.record-button.recording .record-icon {
    background: white;
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.voice-status {
    color: white;
    font-size: 15px;
    font-weight: 600;
}

.voice-timer {
    color: white;
    font-size: 18px;
    margin-top: 6px;
    font-weight: 300;
}

.report-preview {
    background: #f7fafc;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.report-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: #2d3748;
}

.processing {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state .icon {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

/* ============================================================================
   TABS
   ============================================================================ */

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #4a5568;
    background: #f7fafc;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================================
   REMINDER BOX
   ============================================================================ */

.reminder-box {
    background: #f0f4f8;
    border: 1px solid #d1dce5;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #4a5568;
    line-height: 1.4;
}

/* ============================================================================
   RECORD BUTTON - BLUE IDLE, RED RECORDING
   ============================================================================ */

.record-button {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #3498db;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
}

.record-button:hover {
    transform: scale(1.05);
    background: #2980b9;
}

.record-button.recording {
    background: #e74c3c;
    animation: pulse 1.5s infinite;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.record-button.recording:hover {
    background: #c0392b;
}

.record-icon {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
}

.record-button.recording .record-icon {
    background: white;
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

/* ============================================================================
   FILTER CONTROLS (Previous Care Notes)
   ============================================================================ */

.filter-controls {
    background: #f7fafc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-controls .btn-secondary {
    width: 100%;
    margin-bottom: 15px;
}

.date-range-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.date-input {
    flex: 1;
    min-width: 140px;
}

.date-input label {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-bottom: 5px;
}

.date-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.date-range-controls .btn-primary {
    padding: 10px 25px;
}

/* ============================================================================
   NOTE CARDS (Previous Care Notes List)
   ============================================================================ */

.note-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.note-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.note-card.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-datetime {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.note-preview {
    color: #718096;
    font-size: 13px;
    line-height: 1.4;
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-routine {
    background: #d4edda;
    color: #155724;
}

.badge-incident {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================================================
   FULL REPORT VIEW
   ============================================================================ */

.report-header h3 {
    color: #2d3748;
    margin-bottom: 5px;
}

.incident-type {
    color: #e74c3c;
    font-size: 13px;
    margin-bottom: 15px;
}
