/* ============================================================================
   Control de Armeria - CSS Principal
   Tema: Claro con acentos dorados (estetica profesional/seguridad)
   ============================================================================ */

:root {
    --primary:    #1e3a5f;
    --primary-light: #2c5282;
    --gold:       #b8860b;
    --gold-hover: #996f09;
    --accent:     #1e3a5f;
    --bg:         #f8fafc;
    --bg-card:    #ffffff;
    --bg-sidebar: #1e3a5f;
    --border:     #e2e8f0;
    --text:       #1e293b;
    --text-muted: #64748b;
}

/* -- Scrollbar ------------------------------------------------------------ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* -- General -------------------------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text);
}

/* -- Focus Rings ---------------------------------------------------------- */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

/* -- Tables --------------------------------------------------------------- */
table {
    border-collapse: collapse;
}

th {
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* -- Modals --------------------------------------------------------------- */
.modal-backdrop {
    animation: fadeIn 0.15s ease-out;
}

.modal-content {
    animation: slideUp 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -- Toast Notifications -------------------------------------------------- */
.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideInRight 0.3s ease-out;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.toast-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.toast-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.toast-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* -- Loading -------------------------------------------------------------- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* -- Print ---------------------------------------------------------------- */
@media print {
    aside, header, .no-print {
        display: none !important;
    }
    main {
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }
}

/* -- Blazor Validation ---------------------------------------------------- */
.validation-message {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.invalid {
    border-color: #ef4444 !important;
}

.valid {
    border-color: #10b981 !important;
}

/* -- Date Input Fix ------------------------------------------------------- */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* -- Select Arrow --------------------------------------------------------- */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* -- Signature Pad -------------------------------------------------------- */
.signature-pad {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

.signature-pad:hover {
    border-color: var(--gold);
}

/* -- Sidebar (dark accent sidebar) ---------------------------------------- */
.sidebar-dark {
    background: linear-gradient(180deg, #1e3a5f 0%, #162d4a 100%);
}
