/* ================================================
   FANCOLD – Professional SaaS Dashboard Theme
   Following ui-ux-pro-max guidelines
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- Design Tokens ---- */
:root {
    --color-primary: #6366F1;
    --color-primary-dark: #4F46E5;
    --color-primary-light: #EEF2FF;
    --color-secondary: #10B981;
    --color-secondary-dark: #059669;
    --color-danger: #EF4444;
    --color-danger-dark: #DC2626;
    --color-danger-light: #FEF2F2;
    --color-warning: #F59E0B;
    --color-warning-light: #FFFBEB;

    --bg-body: #F1F5F9;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #F8FAFC;
    --bg-muted: #F8FAFC;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #94A3B8;
    --text-on-primary: #FFFFFF;

    --border-color: #E2E8F0;
    --border-hover: #CBD5E1;
    --border-focus: var(--color-primary);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    --z-dropdown: 10;
    --z-sticky: 20;
    --z-overlay: 30;
    --z-modal: 50;
    --z-toast: 60;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- Base ---- */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ---- Focus States (Accessibility) ---- */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ================================================
   LAYOUT
   ================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 5rem;
    /* space for floating navbar */
}

/* ---- Floating Navbar ---- */
.navbar {
    position: fixed;
    top: 0.75rem;
    left: 1rem;
    right: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    z-index: var(--z-sticky);
    transition: box-shadow var(--transition-base);
}

.navbar:hover {
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-brand svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.navbar-user strong {
    color: var(--text-primary);
}

.badge-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.navbar-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    background: none;
    border: none;
    font-family: inherit;
}

.navbar-logout:hover {
    color: var(--color-danger);
    background: var(--color-danger-light);
}

.navbar-logout svg {
    width: 16px;
    height: 16px;
}

/* ---- User Panel (legacy, still usable) ---- */
.user-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* ---- Page Header ---- */
.header {
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header h1 svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* ---- Back Link ---- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.back-link:hover {
    color: var(--text-primary);
    background: var(--bg-muted);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* ================================================
   GRID SYSTEM
   ================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   CARDS
   ================================================ */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-xs);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.card .btn {
    margin-top: auto;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

.card-title svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Dashboard card icon container */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: var(--color-primary-light);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.card-icon.green {
    background: #D1FAE5;
}

.card-icon.green svg {
    color: #059669;
}

.card-icon.amber {
    background: #FEF3C7;
}

.card-icon.amber svg {
    color: #D97706;
}

.card-icon.red {
    background: #FEE2E2;
}

.card-icon.red svg {
    color: #DC2626;
}

.card-icon.blue {
    background: #DBEAFE;
}

.card-icon.blue svg {
    color: #2563EB;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
    min-height: 44px;
    /* touch target */
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--text-on-primary);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--text-on-primary);
}

.btn-secondary:hover {
    background: var(--color-secondary-dark);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--text-on-primary);
}

.btn-danger:hover {
    background: var(--color-danger-dark);
}

.btn-outline {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: none;
    transform: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    min-height: 36px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
    display: flex;
}

/* ================================================
   FORMS
   ================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--border-hover);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

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

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-3 {
    flex: 3;
}

.section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.radio-label input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* ================================================
   MACHINE LIST
   ================================================ */
.machine-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.machine-item {
    position: relative;
    padding: 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-surface);
}

.machine-item:hover {
    border-color: var(--border-hover);
}

@media (hover: hover) {
    .machine-item:hover {
        border-color: var(--color-primary);
        box-shadow: var(--shadow-sm);
    }
}


.machine-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(1px);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    z-index: 1;
}

@media (hover: hover) {
    .machine-item:hover .machine-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

.machine-item.mobile-active {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.machine-item.mobile-active .machine-overlay {
    opacity: 1;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}


.machine-code {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* ---- Hover Action Buttons ---- */
.btn-hover-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 90px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: var(--font-family);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-hover-action:hover {
    box-shadow: var(--shadow-md);
}

.btn-hover-action.details {
    background: var(--color-primary);
    color: white;
}

.btn-hover-action.details:hover {
    background: var(--color-primary-dark);
}

.btn-hover-action.edit {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-hover-action.edit:hover {
    background: var(--bg-muted);
    border-color: var(--border-hover);
}

.btn-hover-action.delete {
    background: var(--color-danger);
    color: white;
}

.btn-hover-action.delete:hover {
    background: var(--color-danger-dark);
}

.btn-details {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.btn-details:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
}

/* ================================================
   LOAN CARDS
   ================================================ */
.loan-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.loan-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.loan-card.returned {
    opacity: 0.65;
}

/* Type label */
.loan-type-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Header row */
.loan-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -0.35rem;
}

.loan-code-lg {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: var(--color-warning-light);
    color: #B45309;
}

.status-badge.returned {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

/* Info grid */
.loan-info-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.info-col {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-col-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-col-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.4;
}

.info-col-value svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.info-col-value.highlight {
    color: var(--text-primary);
    font-weight: 600;
}

/* Actions row */
.loan-actions-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-card-action svg {
    width: 14px;
    height: 14px;
}

.btn-card-action.return {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.btn-card-action.return:hover {
    background: #E2E8F0;
}

.btn-card-action.pdf {
    background: var(--text-primary);
    color: white;
}

.btn-card-action.pdf:hover {
    background: #1E293B;
}

.btn-card-action.details {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-card-action.details:hover {
    background: var(--bg-muted);
    border-color: var(--border-hover);
}

/* ================================================
   INFO GRID & QR
   ================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.info-item {
    padding: 1rem;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 600;
}

.qr-container {
    text-align: center;
    padding: 2rem;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.qr-image {
    max-width: 280px;
    margin: 1rem auto;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.qr-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.summary-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
}

.actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ================================================
   ALERTS & TOASTS
   ================================================ */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 3px solid var(--color-secondary);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 3px solid var(--color-danger);
}

/* Success / Error Toast */
.success-popup {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--color-secondary);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: var(--z-toast);
    animation: toastSlideIn var(--transition-slow) ease-out;
}

.success-popup svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.success-popup.error-popup {
    background: var(--color-danger);
}

.success-popup.fade-out {
    animation: toastFadeOut var(--transition-slow) ease-out forwards;
}

/* ================================================
   LOADING & SPINNER
   ================================================ */
.loading {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-secondary);
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-line {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-line.w-75 {
    width: 75%;
}

.skeleton-line.w-50 {
    width: 50%;
}

.skeleton-line.w-25 {
    width: 25%;
}

/* ================================================
   MAINTENANCE
   ================================================ */
.maintenance-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: var(--color-warning-light);
    color: #92400E;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.maintenance-item-row {
    margin-bottom: 0.5rem;
    padding: 0.875rem;
    background: #FFFBEB;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-warning);
}

.procedure-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}

.procedure-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* ================================================
   LOGO WRAPPER
   ================================================ */
.logo-wrapper {
    margin-bottom: 1rem;
}

.logo-wrapper img {
    max-width: 180px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-wrapper-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.logo-wrapper-sm img {
    max-width: 140px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.new-procedure {
    animation: fadeIn 0.4s ease-out;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .loan-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-top: 4.5rem;
    }

    .navbar {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.875rem;
    }

    .grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.25rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .success-popup {
        bottom: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    .loan-info-grid {
        grid-template-columns: 1fr;
    }

    .loan-actions-row {
        flex-direction: column;
        width: 100%;
    }

    .btn-card-action {
        width: 100%;
        justify-content: center;
    }
}