/* IT Assets Purchase Request System - Styles */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
}

/* High-contrast selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Navbar */
.navbar {
    background: #000000;
    color: white;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary);
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    height: 32px;
    width: auto;
    background: white;
    padding: 2px 4px;
    border-radius: 4px;
}

.nav-brand-text {
    font-size: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

.nav-user {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.nav-logout {
    color: var(--danger) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    align-items: center;
    justify-content: center;
}

/* Notifications */
.nav-notifications { position: relative; }
.bell { cursor: pointer; font-size: 1.1rem; position: relative; }
.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 10px;
}

.notif-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 36px;
    width: min(320px, calc(100vw - 32px));
    max-height: 400px;
    overflow-y: auto;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 200;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.notif-header button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
}

a.notif-item {
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
    color: var(--gray-600);
    text-decoration: none;
    cursor: pointer;
}

a.notif-item:hover { background: #f8fafc; color: var(--gray-800); }

.notif-item.unread { background: #eff6ff; }
.notif-item.unread:hover { background: #e0efff; }

.notif-item p { margin: 0 0 4px; }
.notif-item small { color: var(--gray-400); }

.notif-empty {
    padding: 20px;
    text-align: center;
    color: var(--gray-400);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 24px;
    }
}

.empty-state {
    background: var(--gray-100);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    color: var(--gray-500);
}

.empty-state p {
    margin: 0 0 16px;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #cffafe; color: #155e75; border: 1px solid #a5f3fc; }

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background: var(--gray-100);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 440px;
    margin: 16px;
    border: 1px solid var(--gray-300);
}

@media (min-width: 480px) {
    .login-card {
        padding: 40px;
        margin: 0;
    }
}

.login-logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0 auto 16px;
}

.login-card h2 { margin: 0 0 4px; color: var(--gray-800); }
.login-card .subtitle { color: var(--gray-500); margin-bottom: 24px; }

.demo-accounts {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.demo-accounts h4 { margin: 0 0 12px; font-size: 0.9rem; color: var(--gray-600); }

.demo-accounts table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.demo-accounts th, .demo-accounts td {
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid var(--gray-200);
}

.demo-accounts th { color: var(--gray-500); font-weight: 500; }
.demo-accounts td { color: var(--gray-600); }

/* Dashboard */
.dashboard h1 { margin: 0 0 8px; color: var(--gray-800); }
.welcome { color: var(--gray-500); margin-bottom: 24px; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
        margin-bottom: 32px;
    }
}

.stat-card {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
    .stat-card {
        padding: 20px;
    }
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

@media (min-width: 768px) {
    .stat-value {
        font-size: 2rem;
    }
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.section { margin-bottom: 32px; }
.section h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
}

.count-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pr-items-table-wrapper {
    overflow-x: auto;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    border: 1px solid var(--gray-200);
}

.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.data-table th {
    background: var(--gray-200);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-table.compact th, .data-table.compact td { padding: 8px 12px; font-size: 0.85rem; }

.data-table tfoot th { background: var(--gray-50); }

.text-right { text-align: right; }

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-draft { background: var(--gray-100); color: var(--gray-600); }
.status-pending_dept_head { background: #dbeafe; color: #1e40af; }
.status-pending_finance { background: #fef3c7; color: #92400e; }
.status-pending_procurement { background: #e0e7ff; color: #3730a3; }
.status-pending_final_auth { background: #fce7f3; color: #9d174d; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-on_hold { background: #fef3c7; color: #92400e; }
.status-po_issued { background: #dcfce7; color: #166534; }
.status-po_manual { background: #e0e7ff; color: #3730a3; }
.status-routing_error { background: #fee2e2; color: #991b1b; }
.status-active { background: #dcfce7; color: #166534; }
.status-blacklisted { background: #fee2e2; color: #991b1b; }
.status-new { background: #dbeafe; color: #1e40af; }

.checkpoint-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-800);
    color: white;
    margin-left: 8px;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Request Detail */
.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.request-header h1 { margin: 0; color: var(--gray-800); }
.request-header .meta { color: var(--gray-500); margin: 4px 0 0; }

.request-status { text-align: right; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .detail-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin-bottom: 24px;
    }
}

.detail-card {
    background: var(--gray-100);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
}

.detail-card h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
}

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th, .detail-table td {
    padding: 8px 0;
    text-align: left;
    vertical-align: top;
}
.detail-table th { color: var(--gray-500); font-weight: 500; width: 40%; font-size: 0.85rem; }
.detail-table td { color: var(--gray-600); }
.detail-table .amount { font-weight: 600; }
.detail-table .positive { color: var(--success); }
.detail-table .negative { color: var(--danger); }

.budget-card { border-left: 4px solid var(--warning); }
.vendor-card { border-left: 4px solid var(--info); }
.po-card { border-left: 4px solid var(--success); }
.action-card { border-left: 4px solid var(--primary); }

/* Approval Timeline */
.approval-timeline { position: relative; padding-left: 24px; }
.approval-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-badge {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--gray-100);
    box-shadow: 0 0 0 2px var(--gray-300);
}

.timeline-badge.approved { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-badge.rejected { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.timeline-badge.hold { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }

.timeline-content strong { display: block; margin-bottom: 4px; }
.decision-label {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 8px;
}
.decision-label.approved { background: #dcfce7; color: #166534; }
.decision-label.rejected { background: #fee2e2; color: #991b1b; }
.decision-label.hold { background: #fef3c7; color: #92400e; }

.rejection-reason {
    background: #fee2e2;
    color: #991b1b;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-top: 8px;
}

.cert { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }
.cert code { background: var(--gray-100); color: var(--gray-700); padding: 2px 6px; border-radius: 4px; }

/* Forms */
.form-page h1 { margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--gray-600); margin-bottom: 4px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: #ffffff;
    color: var(--gray-800);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(220 38 38 / 0.15);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

.required { color: var(--danger); }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

.form-row-inline { margin-bottom: 16px; }

/* Items Table in Form */
.items-table-wrapper { overflow-x: auto; margin-bottom: 12px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.items-table th, .items-table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--gray-200); }
.items-table th { background: var(--gray-50); font-size: 0.8rem; color: var(--gray-600); }
.items-table input { width: 100%; padding: 6px 8px; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 0.9rem; background: #ffffff; color: var(--gray-800); }
.items-table .qty, .items-table .unit { width: 70px; }
.items-table .unit-cost { width: 110px; }
.items-table .row-total { font-weight: 600; color: var(--gray-600); min-width: 80px; }
.items-table .grand-total-label { text-align: right; font-weight: 600; }
.items-table .grand-total { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

.btn-icon {
    background: var(--gray-200);
    border: none;
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gray-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: var(--gray-300); color: var(--gray-700); }

/* Radio group */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.2s;
    color: var(--gray-700);
}
.radio-label:has(input:checked) { border-color: var(--primary); background: #eff6ff; }
.radio-label input { display: none; }
.radio-text { font-weight: 500; }
.radio-text.approve { color: var(--success); }
.radio-text.reject { color: var(--danger); }
.radio-text.hold { color: var(--warning); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    min-height: 40px;
    min-width: 44px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }

.btn-print { background: #2563eb; color: white; }
.btn-print:hover { background: #1d4ed8; }

.btn-secondary { background: var(--gray-200); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-link { background: none; color: var(--primary); padding: 8px 12px; }
.btn-link:hover { text-decoration: underline; }

.btn-block { width: 100%; padding: 12px; }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; min-height: 36px; }

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
    flex-wrap: wrap;
}

/* Admin */
.admin-page h1 { margin-bottom: 20px; color: var(--gray-800); }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

.inline-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-200); }
.inline-form h4 { margin: 0 0 12px; font-size: 0.9rem; color: var(--gray-600); }

.data-table td .inline-form,
.form-actions-doc .inline-form {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
}

.form-actions-doc .inline-form button {
    margin: 0;
}

.existing-attachments {
    margin-bottom: 14px;
    padding: 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.form-row input, .form-row select {
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Audit */
.audit-page h1 { margin-bottom: 4px; color: var(--gray-800); }
.audit-page .subtitle { color: var(--gray-500); margin-bottom: 20px; }

.action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
}

.mono { font-family: 'SF Mono', Monaco, monospace; font-size: 0.85rem; }

/* ============================================
   PDF-FORM DOCUMENT STYLES
   ============================================ */

.form-document-wrapper {
    max-width: 8.5in;
    margin: 0 auto;
    padding: 24px;
}

.pr-form-document {
    background: #fff;
    border: 1px solid var(--gray-300);
    width: 8.5in;
    min-height: 11in;
    padding: 0.5in;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.pr-form-document > * {
    min-width: 0;
}

.pr-form-document > form {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-width: 0;
}

.form-header-center {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--gray-700);
    padding-bottom: 12px;
}

.form-logo {
    display: block;
    max-width: 160px;
    height: auto;
    margin: 0 auto 12px;
}

.form-header-center h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-800);
}

.pr-meta-tag {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.pr-number {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Top grid: Date of Request, Date Required, Vendor */
.form-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    border: 1px solid var(--gray-800);
    margin-bottom: 0;
}

.form-field-box {
    border-right: 1px solid var(--gray-700);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
}

.form-field-box:last-child { border-right: none; }

.form-field-box label,
.form-field-line label,
.form-purpose label,
.dept-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.form-field-box input,
.form-field-line input,
.form-purpose input {
    border: none;
    border-bottom: 1px solid var(--gray-400);
    padding: 4px 0;
    font-size: 0.95rem;
    background: transparent;
    width: 100%;
    font-family: inherit;
    color: var(--gray-700);
}

.form-field-box input:focus,
.form-field-line input:focus,
.form-purpose input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.field-value {
    font-size: 0.95rem;
    padding: 4px 0;
    border-bottom: 1px solid var(--gray-400);
    min-height: 28px;
    color: var(--gray-700);
}

/* Middle section: Requested By / Branch + Department checkboxes */
.form-mid-section {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    border: 1px solid var(--gray-700);
    border-top: none;
}

.form-left-col {
    border-right: 1px solid var(--gray-700);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field-line {
    display: flex;
    flex-direction: column;
}

.form-right-col {
    padding: 12px;
}

.dept-checkboxes {
    display: flex;
    flex-direction: column;
}

.dept-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    margin-top: 6px;
}

.cb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--gray-600);
    cursor: pointer;
}

.cb-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
}

.cb-row span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.others-input {
    border: none;
    border-bottom: 1px solid var(--gray-400);
    width: 80px;
    font-size: 0.8rem;
    padding: 0;
}

/* Purpose */
.form-purpose {
    border: 1px solid var(--gray-700);
    border-top: none;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
}

.purpose-value {
    min-height: 28px;
    padding: 4px 0;
    color: var(--gray-700);
}

/* Classic PR items table */
.pr-items-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--gray-700);
    border-top: none;
    font-size: 0.85rem;
}

.pr-items-table th,
.pr-items-table td {
    border: 1px solid var(--gray-700);
    padding: 8px 10px;
    text-align: left;
}

.pr-items-table thead th {
    background: var(--gray-100);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-700);
}

.pr-items-table tbody td {
    vertical-align: top;
    color: var(--gray-800);
}

.pr-items-table tbody td input {
    width: 100%;
    border: none;
    font-size: 0.85rem;
    padding: 2px 0;
    font-family: inherit;
    background: transparent;
    color: var(--gray-800);
}

.pr-items-table tbody td input:focus {
    outline: none;
    background: #fffbeb;
}

.pr-items-table .num {
    text-align: right;
}

.pr-items-table .row-total {
    text-align: right;
    font-weight: 600;
    color: var(--gray-700);
}

.pr-items-table tfoot td {
    background: var(--gray-100);
    font-weight: 700;
}

.pr-items-table .total-label {
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.pr-items-table .total-value {
    text-align: right;
    font-size: 1rem;
}

.currency-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
}

.currency-wrap::before {
    content: '₱';
    font-size: 0.85rem;
    color: var(--gray-600);
}

.currency-wrap input {
    flex: 1;
    min-width: 0;
}

.row-del {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add-row {
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    background: var(--gray-200);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    color: var(--gray-700);
}

.btn-add-row:hover { background: var(--gray-300); }

/* Meta row */
.form-meta-row {
    display: flex;
    gap: 20px;
    margin: 16px 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-300);
}

.meta-cb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Signatures */
.form-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35in 1in;
    margin-top: auto;
    margin-bottom: 0.35in;
    padding: 0;
    page-break-inside: avoid;
    break-inside: avoid;
}

.sig-box {
    text-align: center;
}

.sig-img-wrap {
    height: 0.45in;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    margin-bottom: 0.02in;
}

.sig-img-wrap img {
    max-width: 100%;
    max-height: 0.4in;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sig-line {
    border-bottom: 1px solid var(--gray-700);
    height: 0.05in;
    margin-bottom: 0.02in;
}

.sig-box label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    line-height: 1.2;
}

.sig-name {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.02in;
    min-height: 0.16in;
    line-height: 1.2;
}

/* Document form actions */
.form-actions-doc {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid var(--gray-300);
    flex-wrap: wrap;
}

.btn-submit-pr {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-cancel {
    padding: 12px 20px;
    font-size: 0.9rem;
    color: var(--gray-600);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel:hover { color: var(--gray-700); }

/* Responsive document form */
@media (max-width: 768px) {
    .form-document-wrapper { padding: 12px; }
    .pr-form-document { padding: 20px; }
    .form-top-grid { grid-template-columns: 1fr; }
    .form-field-box { border-right: none; border-bottom: 1px solid var(--gray-700); }
    .form-mid-section { grid-template-columns: 1fr; }
    .form-left-col { border-right: none; border-bottom: 1px solid var(--gray-700); }
    .dept-grid { grid-template-columns: 1fr; }
    .form-signatures { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
    .form-document-wrapper { padding: 8px; }
    .pr-form-document { padding: 16px; border-radius: var(--radius); }
    .form-header-center h1 { font-size: 1.1rem; }
    .form-field-box,
    .form-field-line,
    .form-purpose,
    .form-right-col,
    .form-left-col { padding: 10px; }
    .pr-items-table { font-size: 0.8rem; }
    .pr-items-table th,
    .pr-items-table td { padding: 6px; }
}

/* E-Signature Styles */
.e-sign-section {
    border: 2px dashed var(--gray-300);
    padding: 20px;
    border-radius: var(--radius);
    background: var(--gray-100);
    margin-top: 16px;
}

.e-sign-preview {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 12px;
}

.e-sign-preview img {
    max-width: 280px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.e-sign-placeholder {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.e-sign-placeholder p { margin: 0; }
.e-sign-placeholder .hint { font-size: 0.8rem; color: var(--gray-400); margin-top: 4px; }

.e-sign-status { margin: 8px 0 12px; }

.e-sign-approval {
    margin: 8px 0;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 8px 12px;
    border-radius: var(--radius);
    display: inline-block;
}

.e-sign-approval img {
    max-width: 300px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.e-sign-confirmation {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 16px;
}

.e-sign-confirmation .e-sign-preview.small {
    padding: 10px;
    margin-bottom: 12px;
}

.e-sign-confirmation .e-sign-preview.small img {
    max-width: 220px;
    max-height: 90px;
}

.e-sign-confirmation .cb-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.e-sign-confirmation .cb-row input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Attachments */
.form-attachments {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
}

.form-attachments h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--gray-700);
}

.attachment-help {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.attachment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.attachment-row label {
    min-width: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
}

.attachment-row input[type="file"] {
    flex: 1;
    min-width: 200px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

@media (max-width: 480px) {
    .attachment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .attachment-row label {
        min-width: auto;
    }

    .attachment-row input[type="file"] {
        width: 100%;
        min-width: auto;
    }
}

.attachments-card .attachment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.attachments-card .attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.attachments-card .attachment-item:last-child {
    border-bottom: none;
}

.attachment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attachment-name {
    font-weight: 500;
    color: var(--gray-700);
}

.attachment-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.attachment-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* AI Assistant Widget */
/* AI Assistant Widget — Modern Design */
.ai-assistant-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    font-family: inherit;
    --ai-primary: var(--primary);
    --ai-primary-dark: var(--primary-dark);
    --ai-bg: rgba(255, 255, 255, 0.96);
}

.ai-assistant-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 299;
    backdrop-filter: blur(2px);
}

.ai-assistant-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.ai-assistant-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ai-primary) 0%, #991b1b 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    animation: ai-pulse-attention 3s ease-in-out infinite;
}

.ai-assistant-toggle:hover,
.ai-assistant-toggle:focus {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.45);
    animation: none;
}

.ai-assistant-toggle:active {
    transform: scale(0.96);
}

.ai-assistant-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: var(--ai-bg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    overflow: hidden;
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(16px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    backdrop-filter: blur(16px);
}

.ai-assistant-panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.ai-assistant-header {
    background: linear-gradient(135deg, var(--ai-primary) 0%, #991b1b 100%);
    color: white;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.2);
}

.ai-assistant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.ai-assistant-title {
    flex: 1;
    min-width: 0;
}

.ai-assistant-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ai-assistant-header span {
    display: block;
    font-size: 0.78rem;
    opacity: 0.9;
    margin-top: 2px;
}

.ai-assistant-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ai-assistant-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ai-lang-select-wrapper {
    display: flex;
    align-items: center;
    padding-right: 4px;
}

.ai-lang-select {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    max-width: 110px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ai-lang-select:hover,
.ai-lang-select:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.ai-lang-select option {
    background: white;
    color: var(--gray-800);
}

.ai-assistant-messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.ai-message {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.55;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    animation: ai-message-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ai-message.bot {
    align-self: flex-start;
    background: white;
    color: var(--gray-800);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom-left-radius: 6px;
}

.ai-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--ai-primary) 0%, #991b1b 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.ai-message.bot ul,
.ai-message.bot ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-message.bot li {
    margin-bottom: 5px;
}

.ai-message.bot strong {
    color: var(--ai-primary-dark);
}

.ai-message.bot code {
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #334155;
}

.ai-typing {
    align-self: flex-start;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    animation: ai-message-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: ai-dot-bounce 1.4s infinite ease-in-out both;
}

.ai-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.ai-assistant-input {
    display: flex;
    align-items: center;
    padding: 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background: white;
    gap: 10px;
}

.ai-assistant-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    font-size: 0.9rem;
    background: var(--gray-50);
    color: var(--gray-800);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ai-assistant-input input:focus {
    outline: none;
    border-color: var(--ai-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.ai-assistant-input input::placeholder {
    color: var(--gray-400);
}

.ai-assistant-input button {
    padding: 11px 18px;
    background: linear-gradient(135deg, var(--ai-primary) 0%, #991b1b 100%);
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.ai-assistant-input button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.ai-assistant-input button:active {
    transform: translateY(0);
}

.ai-assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.ai-suggestion-chip {
    padding: 7px 13px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ai-suggestion-chip:hover,
.ai-suggestion-chip:focus {
    border-color: var(--ai-primary);
    color: var(--ai-primary);
    background: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.12);
    outline: none;
}

.ai-suggestion-chip:active {
    transform: translateY(0);
}

/* Animations */
@keyframes ai-message-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ai-dot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes ai-pulse-attention {
    0%, 100% { box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35); }
    50% { box-shadow: 0 8px 28px rgba(220, 38, 38, 0.55); }
}

/* Print styles */
@media print {
    @page {
        size: letter;
        margin: 0.5in;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html, body {
        background: #fff;
        margin: 0;
        padding: 0;
        font-size: 12pt;
    }

    /* Hide non-print UI */
    .navbar,
    .nav-links,
    .nav-notifications,
    .ai-assistant-widget,
    .ai-assistant-backdrop,
    .form-actions-doc,
    .request-header .btn,
    .request-header a,
    .detail-card .form-actions,
    .detail-card .inline-form,
    .form-attachments,
    .approval-timeline,
    .e-sign-section,
    .attachments-card,
    .pr-form-document .detail-card,
    .detail-card,
    .btn-add-row,
    .row-del,
    .btn,
    .alert,
    footer {
        display: none !important;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .form-document-wrapper {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .pr-form-document {
        width: 8.5in;
        min-height: 10in;
        padding: 0.25in;
        border: 1px solid #000;
        box-shadow: none;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        page-break-inside: auto;
    }

    .pr-form-document > form {
        display: flex;
        flex-direction: column;
        flex: 1 0 auto;
        min-width: 0;
    }

    .form-header-center {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .form-logo {
        max-width: 120px;
        margin-bottom: 8px;
    }

    .form-header-center h1 {
        font-size: 16pt;
    }

    .form-field-box,
    .form-field-line,
    .form-purpose,
    .form-left-col,
    .form-right-col {
        padding: 6px 8px;
    }

    .form-field-box label,
    .form-field-line label,
    .form-purpose label,
    .dept-label {
        font-size: 7pt;
    }

    /* Departments in a single horizontal line when printing */
    .dept-checkboxes {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .dept-checkboxes .dept-label {
        margin: 0;
        white-space: nowrap;
    }

    .dept-checkboxes .dept-grid {
        display: flex;
        flex-wrap: wrap;
        flex: 1;
        gap: 4px 14px;
        margin-top: 0;
    }

    .dept-checkboxes .cb-row {
        white-space: nowrap;
        font-size: 8pt;
        gap: 3px;
    }

    .dept-checkboxes .cb-row input[type="checkbox"] {
        width: 10px;
        height: 10px;
    }

    .field-value,
    .form-field-box input,
    .form-field-line input,
    .form-purpose input,
    .purpose-value {
        font-size: 10pt;
    }

    .pr-items-table {
        font-size: 9pt;
    }

    .pr-items-table th,
    .pr-items-table td {
        padding: 4px 6px;
    }

    .form-signatures {
        grid-template-columns: 1fr 1fr;
        gap: 0.25in 0.75in;
        margin-top: auto;
        margin-bottom: 0.2in;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .sig-img-wrap {
        height: 0.35in;
        margin-bottom: 0.02in;
    }

    .sig-img-wrap img {
        max-height: 0.3in;
    }

    .sig-line {
        height: 0.04in;
        margin-bottom: 0.02in;
    }

    .sig-box label {
        font-size: 7pt;
    }

    .sig-name {
        font-size: 8pt;
        margin-top: 0.02in;
    }

    /* Keep page breaks clean */
    .pr-form-document,
    .form-top-grid,
    .form-mid-section,
    .form-purpose,
    .pr-items-table,
    .form-signatures {
        page-break-inside: avoid;
    }
}

/* Responsive - Mobile First */

/* Navbar mobile menu */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #000000;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0;
        gap: 0;
        box-shadow: var(--shadow-md);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a,
    .nav-links .nav-notifications {
        padding: 14px 24px;
        border-bottom: 1px solid #333333;
        font-size: 1rem;
    }

    .nav-user {
        display: block;
        padding: 14px 24px;
        color: var(--gray-500);
        font-size: 0.9rem;
        border-bottom: 1px solid #333333;
    }

    .nav-brand-text {
        font-size: 0.95rem;
    }

    .notif-dropdown {
        position: fixed;
        top: 56px;
        left: 16px;
        right: 16px;
        width: auto;
        max-height: calc(100vh - 80px);
    }

    .request-header { flex-direction: column; }
    .request-status { text-align: left; margin-top: 12px; }

    .form-actions,
    .form-actions-doc {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .form-actions .btn,
    .form-actions-doc .btn,
    .form-actions-doc .btn-submit-pr,
    .form-actions-doc .btn-cancel {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
        gap: 8px;
    }

    .radio-label {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row input,
    .form-row select,
    .form-row button {
        width: 100%;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .ai-assistant-widget {
        bottom: 12px;
        right: 12px;
    }

    .ai-assistant-panel {
        position: fixed;
        bottom: 72px;
        right: 0;
        left: 0;
        width: 100vw;
        height: calc(100vh - 84px);
        max-width: none;
        max-height: none;
        border-radius: 16px 16px 0 0;
        transform-origin: bottom center;
    }

    .ai-assistant-toggle {
        width: 56px;
        height: 56px;
    }

    .ai-suggestion-chip {
        min-height: 36px;
        padding: 8px 14px;
    }

    .ai-assistant-close {
        width: 40px;
        height: 40px;
    }
}
