:root {
    --primary: #001F3F;
    /* VIP Medicos Dark Blue */
    --primary-hover: #003366;
    --secondary: #FF8C00;
    /* VIP Medicos Orange */
    --background: #F4F7F6;
    /* Light gray/white background */
    --card-bg: #FFFFFF;
    /* Pure white card */
    --text-main: #333333;
    /* Dark gray for readability */
    --text-muted: #666666;
    --border: #E0E0E0;
    --error: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Remove background shapes for clean professional look */
.background-shapes {
    display: none;
}

/* Form Container */
.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.form-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.05);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header img.logo {
    max-width: 180px;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Honeypot */
.hp-wrapper {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Form Inputs */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 14px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.1);
}

/* File input styling overide to look clean on white */
input[type="file"] {
    background: #F9FAFB !important;
    color: var(--text-main) !important;
    border: 1px dashed var(--border) !important;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button */
button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

button:hover {
    background: var(--primary-hover);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loader */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #F87171;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #34D399;
}

/* Secure Badge */
.secure-badge {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.secure-badge svg {
    color: var(--success);
}

/* Admin Specific Overrides */
.admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.admin-header h1 {
    color: var(--primary);
    margin: 0;
    font-size: 22px;
}

.table-responsive {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
    font-size: 14px;
}

th,
td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: #F9FAFB;
    font-weight: 600;
    color: var(--text-muted);
}

tr:hover {
    background: #F9FAFB;
}

.status-select {
    background: #FFFFFF;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.badge.nuevo {
    background: var(--error);
}

.badge.asignado {
    background: #3b82f6;
    /* Blue for assigned */
}

.badge.en_proceso {
    background: var(--secondary);
}

.badge.resuelto {
    background: var(--success);
}

.attachment-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.attachment-link:hover {
    text-decoration: underline;
}

.dashboard-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

/* Voice Recorder Styles */
.recorder-wrapper {
    margin-bottom: 25px;
    background: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
}

.recorder-wrapper label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.recorder-UI {
    display: flex;
    align-items: center;
    gap: 15px;
}

.record-btn {
    background: var(--primary);
    width: auto;
    padding: 10px 20px;
    margin-top: 0;
}

.record-btn.recording {
    background: var(--error);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.record-time {
    font-family: monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.audio-preview {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-audio-btn {
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 8px 12px;
    width: auto;
    font-size: 13px;
    margin-top: 0;
}

.delete-audio-btn:hover {
    background: var(--error);
    color: white;
}

/* Drag and Drop Zone */
.drop-zone {
    width: 100%;
    min-height: 120px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted);
    border: 2px dashed var(--border);
    border-radius: 8px;
    background-color: #F9FAFB;
    transition: background-color 0.2s, border-color 0.2s;
}

.drop-zone--over {
    border-style: solid;
    border-color: var(--primary);
    background-color: rgba(0, 31, 63, 0.05);
}

.drop-zone__input {
    display: none;
}

.file-list {
    list-style: none;
    margin-top: 10px;
    padding: 0;
}

.file-list li {
    background: white;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 5px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-file {
    color: var(--error);
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

/* --- Paces Theme Admin Layout --- */
.admin-body {
    background-color: var(--background);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: #1a1e2f;
    /* Dark sidebar */
    color: #8b92a5;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #2d3348;
}

.sidebar-logo {
    height: 30px;
    margin-right: 10px;
}

.sidebar-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-menu-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #555d7a;
    padding: 20px 20px 10px;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #8b92a5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-menu li a .icon {
    margin-right: 15px;
    font-size: 18px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    /* very subtle highlight */
    border-left: 3px solid #6366f1;
    /* purple/blue highlight */
}

/* Main Wrapper */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navigation */
.top-nav {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 5px 15px;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 14px;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge-role {
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.btn-logout {
    text-decoration: none;
    font-size: 20px;
    color: #64748b;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: #ef4444;
}

/* Page Content */
.page-content {
    padding: 30px;
    overflow-y: auto;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 25px;
}

/* Paces Paces Stat Cards */
.paces-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.paces-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.paces-card-welcome {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.paces-card-welcome .greeting {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.paces-card-welcome .name {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.paces-card-welcome .date {
    font-size: 12px;
    color: #64748b;
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

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

.paces-stat-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
}

.paces-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paces-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.paces-stat-change {
    font-size: 13px;
    color: #64748b;
}

.paces-stat-change.up {
    color: #10b981;
}

.paces-stat-change.down {
    color: #ef4444;
}

/* Refined Table for Paces */
.paces-table-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.paces-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
}