/* ============================================
   MODERN STRICT DESIGN SYSTEM
   Clean, Interactive, Responsive
   ============================================ */

:root {
    /* Colors - from main branch (Tailwind-like grays) */
    --color-black: #1f2937;
    --color-dark: #374151;
    --color-gray: #6b7280;
    --color-muted: #6b7280;
    --color-light: #f9fafb;
    --color-lighter: #f9fafb;
    --color-white: #fff;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* Accent colors - subtle (kept for badges/alerts) */
    --color-success: #2e7d32;
    --color-success-bg: #e8f5e9;
    --color-warning: #f57c00;
    --color-warning-bg: #fff3e0;
    --color-danger: #c62828;
    --color-danger-bg: #ffebee;
    --color-info: #1f2937;
    --color-info-bg: #f3f4f6;

    /* Shadows - from main branch */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Border radius - from main (8px, 12px) */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* ============================================
   BASE STYLES
   ============================================ */

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-dark);
    background: var(--color-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login page – background: gradient + subtle dot pattern */
body.page-login {
    position: relative;
    min-height: 100vh;
}
body.page-login::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #f5f6f8;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(229, 231, 235, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(243, 244, 246, 0.8) 0%, transparent 45%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1' fill='%23e5e7eb' opacity='0.6'/%3E%3C/svg%3E");
    background-size: 100% 100%, 100% 100%, 24px 24px;
    background-position: 0 0, 0 0, 0 0;
}
body.page-login .navbar,
body.page-login .env-warning-bar,
body.page-login .app-main,
body.page-login .company-footer {
    position: relative;
    z-index: 1;
}

/* Selection */
::selection {
    background: var(--color-dark);
    color: var(--color-white);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-black);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }

.text-muted {
    color: var(--color-muted) !important;
}

/* ============================================
   LINKS
   ============================================ */

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

a:hover {
    color: var(--color-black);
}

/* ============================================
   BUTTONS - Interactive & Modern
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus, .btn:focus-visible, .btn:active:focus, .btn-link.nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Dark button - Primary action */
.btn-dark {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.btn-dark:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Outline buttons */
.btn-outline-dark {
    background: transparent;
    color: var(--color-dark);
    border-color: var(--color-dark);
}

.btn-outline-dark:hover {
    background: var(--color-dark);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--color-gray);
    border-color: var(--color-border);
}

.btn-outline-secondary:hover {
    background: var(--color-light);
    color: var(--color-dark);
    border-color: var(--color-gray);
}

/* Success button */
.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: var(--shadow-sm);
}

/* Danger button */
.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background: #a82222;
    border-color: #a82222;
}

/* Small button */
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Large button */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Link button */
.btn-link {
    background: none;
    border: none;
    color: var(--color-dark);
    padding: 0.25rem 0.5rem;
}

.btn-link:hover {
    color: var(--color-black);
    text-decoration: underline;
}

/* ============================================
   FORMS - Clean & Helpful
   ============================================ */

.form-control, .form-select {
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--color-white);
    transition: all var(--transition-fast);
}

.form-control:hover, .form-select:hover {
    border-color: var(--color-gray);
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-dark);
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
    outline: none;
}

.form-control::placeholder {
    color: var(--color-muted);
}

/* Small form controls */
.form-control-sm, .form-select-sm {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
}

/* Form labels */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-dark);
    margin-bottom: 0.4rem;
}

/* Form text/help */
.form-text {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

/* Validation states */
.form-control.is-invalid {
    border-color: var(--color-danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(198,40,40,0.15);
}

.invalid-feedback, .text-danger {
    font-size: 0.8rem;
    color: var(--color-danger);
}

/* Checkbox & Radio */
.form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--color-dark);
    border-color: var(--color-dark);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
}

/* ============================================
   CARDS - Modern with subtle depth
   ============================================ */

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

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

.card-header {
    background: var(--color-lighter);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--color-lighter);
    border-top: 1px solid var(--color-border);
    padding: 0.875rem 1.25rem;
}

/* Clickable card */
.card-clickable {
    cursor: pointer;
}

.card-clickable:hover {
    border-color: var(--color-gray);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ============================================
   TABLES - Clean & Scannable
   ============================================ */

.table {
    background: var(--color-white);
    margin-bottom: 0;
}

.table th {
    background: var(--color-lighter);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--color-lighter);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Clickable row */
.table-row-clickable tbody tr {
    cursor: pointer;
}

.table-row-clickable tbody tr:hover {
    background: var(--color-border-light);
}

/* Small table */
.table-sm th {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
}

.table-sm td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* ============================================
   BADGES - Subtle status indicators
   ============================================ */

.badge {
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
    border-radius: var(--radius-sm);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Status badges with colors */
.badge-success, .bg-success {
    background: var(--color-success-bg) !important;
    color: var(--color-success) !important;
}

.badge-warning, .bg-warning {
    background: var(--color-warning-bg) !important;
    color: var(--color-warning) !important;
}

.badge-danger, .bg-danger {
    background: var(--color-danger-bg) !important;
    color: var(--color-danger) !important;
}

.badge-info, .bg-info {
    background: var(--color-info-bg) !important;
    color: var(--color-info) !important;
}

.badge-secondary, .bg-secondary {
    background: var(--color-light) !important;
    color: var(--color-gray) !important;
}

/* ============================================
   ALERTS - Informative & Clear
   ============================================ */

.alert {
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border: none;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.alert-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.alert-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.alert-info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border-color: #e5e7eb;
}

/* Bootstrap info class overrides to use theme color */
.btn-info {
    background-color: var(--color-info);
    border-color: var(--color-info);
    color: #fff;
}
.btn-info:hover, .btn-info:focus {
    background-color: var(--color-dark);
    border-color: var(--color-dark);
    color: #fff;
}
.btn-outline-info {
    color: var(--color-info);
    border-color: var(--color-info);
    background: transparent;
}
.btn-outline-info:hover, .btn-outline-info:focus {
    background-color: var(--color-info);
    border-color: var(--color-info);
    color: #fff;
}
.bg-info {
    background-color: var(--color-info) !important;
}
.text-info {
    color: var(--color-info) !important;
}
.border-info {
    border-color: var(--color-info) !important;
}

.alert .btn-close {
    padding: 1rem;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--color-muted);
}

.breadcrumb-item a:hover {
    color: var(--color-dark);
}

.breadcrumb-item.active {
    color: var(--color-dark);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--color-border);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    gap: 0.25rem;
}

.page-link {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--color-border);
    color: var(--color-dark);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--color-light);
    border-color: var(--color-gray);
    color: var(--color-dark);
}

.page-item.active .page-link {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
}

.page-item.disabled .page-link {
    background: var(--color-lighter);
    color: var(--color-muted);
}

/* ============================================
   DROPDOWNS
   ============================================ */

.dropdown-menu {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--color-dark);
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--color-lighter);
    color: var(--color-black);
}

.dropdown-item i {
    width: 1.25rem;
    color: var(--color-muted);
}

.dropdown-divider {
    border-color: var(--color-border-light);
    margin: 0.5rem 0;
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    gap: 0.5rem;
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip-inner {
    background: var(--color-black);
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   LOADING STATES
   ============================================ */

.spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

.btn .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Monospace */
.font-monospace {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    font-size: 0.9em;
}

/* Text truncate */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Interactive element */
.interactive {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.interactive:hover {
    background: var(--color-lighter);
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* ============================================
   STAT CARDS - Dashboard
   ============================================ */

.stat-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-black);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.stat-card .stat-icon {
    font-size: 1.5rem;
    color: var(--color-muted);
    opacity: 0.5;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

/* Mobile cards container */
.mobile-cards {
    display: none;
}

.desktop-table {
    display: block;
}

@media (max-width: 991px) {
    .desktop-table {
        display: none !important;
    }

    .mobile-cards {
        display: block !important;
    }

    .mobile-card {
        background: var(--color-white);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-bottom: 0.75rem;
        box-shadow: var(--shadow-sm);
        transition: all var(--transition-normal);
    }

    .mobile-card:hover {
        box-shadow: var(--shadow-md);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--color-border-light);
    }

    .mobile-card-title {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--color-black);
        margin: 0;
    }

    .mobile-card-subtitle {
        font-size: 0.8rem;
        color: var(--color-muted);
        margin-top: 0.25rem;
    }

    .mobile-card-body {
        display: flex;
        flex-direction: column;
    }

    .mobile-card-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        gap: 0.75rem;
        padding: 0.45rem 0;
        border-bottom: 1px solid var(--color-border-light);
    }

    .mobile-card-row:last-child {
        border-bottom: none;
    }

    .mobile-card-label {
        font-size: 0.75rem;
        color: var(--color-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }

    .mobile-card-value {
        font-size: 0.875rem;
        color: var(--color-dark);
        text-align: right;
        min-width: 0;
    }

    .mobile-card-footer {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--color-border-light);
    }

    /* Container */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Typography */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }

    /* Cards */
    .card-header {
        padding: 0.875rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Form controls - prevent zoom on iOS */
    .form-control, .form-select {
        font-size: 16px;
    }

    /* Stat cards */
    .stat-card {
        margin-bottom: 0.75rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mobile-card {
        padding: 0.875rem;
        border-radius: var(--radius-sm);
    }

    h1 { font-size: 1.25rem; }

    .mobile-card-footer {
        flex-direction: column;
    }

    .mobile-card-footer .btn {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   FOCUS STATES - Accessibility
   ============================================ */

:focus-visible {
    outline: 2px solid #258cfb;
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: none;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .btn, .nav, .pagination, .alert-dismissible .btn-close {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}

/* ============================================
   Development Warning Banner (in-flow top bar)
   ============================================ */

.env-warning-bar {
    margin: 0;
    padding: 0.55rem 0;
    border-width: 0 0 2px 0;
    border-radius: 0;
    box-shadow: none;
    animation: slideDownWarning 0.3s ease-out;
}

@keyframes slideDownWarning {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.env-warning-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.env-warning-text {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
}

.env-warning-bar.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-color: #f59e0b;
    font-weight: 500;
}

/* ============================================
   HOME PAGE STYLES
   ============================================ */

.hero-section {
    background: linear-gradient(to right, #35b8a3 0%, #6dd5c7 70%, #8fe4d8 100%);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255,255,255,0.08);
    transform: rotate(15deg);
}

.hero-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.hero-deadline {
    margin-top: 1.5rem;
    background: rgba(255,255,255,0.15);
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.btn-hero {
    background: white;
    color: #1a5f7a;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-hero:hover {
    background: #f0fdfa;
    color: #1a5f7a;
    transform: translateY(-2px);
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: #1a5f7a;
}

.info-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s;
}

.info-card:hover {
    border-color: #57c5b6;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.info-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    background: #f1f5f9;
    color: #64748b;
}

.info-card-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.info-card-text {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, #1a5f7a 0%, #57c5b6 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: white;
    border: 3px solid #1a5f7a;
    border-radius: 50%;
}

.timeline-content {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.timeline-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.timeline-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

.docs-list {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.25rem;
}

.doc-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.doc-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.doc-item:first-child {
    padding-top: 0;
}

.doc-icon {
    color: #10b981;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.doc-text {
    font-size: 0.9rem;
    color: #374151;
}

.highlight-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 1.5rem;
}

.highlight-title {
    color: #047857;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.highlight-text {
    color: #065f46;
    font-size: 0.9rem;
}

.partner-logo {
    height: 45px;
    opacity: 0.8;
}

.test-mode-indicator {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    animation: pulse-warning 2s infinite;
    display: flex;
    align-items: center;
}

.test-mode-indicator i {
    font-size: 1.1rem;
}

@keyframes pulse-warning {
    0%, 100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(245, 158, 11, 0.7); }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }
}

/* ============================================
   INSTRUCTIONS/GUIDE PAGE STYLES
   ============================================ */

.guide-content {
    background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 50%);
    border: 1px solid #99f6e4;
    border-radius: 12px;
    padding: 2rem;
    color: #374151;
    line-height: 1.7;
}

.guide-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a5f7a;
    margin-bottom: 0.5rem;
}

.guide-content .subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

.guide-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a5f7a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #99f6e4;
}

.guide-content h2 .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #1a5f7a 0%, #35b8a3 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    margin-right: 0.75rem;
}

.guide-content p {
    margin-bottom: 0.75rem;
}

.guide-content ul {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
}

.guide-content li {
    margin-bottom: 0.5rem;
}

.guide-content .note {
    background: #f9fafb;
    border-left: 3px solid #1a5f7a;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.guide-content .cta {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.guide-content .cta h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.guide-content .cta p {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Steps visualization - horizontal stepper */
.steps-visual {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin: 1.5rem 0;
    gap: 0.5rem;
}

.step-item {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    position: relative;
}

.step-item::after {
    content: '→';
    position: absolute;
    right: -0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    z-index: 1;
}

.step-item:last-child::after {
    display: none;
}

.step-circle {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #1a5f7a 0%, #35b8a3 100%);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.step-content {
    display: block;
}

.step-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.8rem;
    line-height: 1.3;
}

.step-label {
    display: none;
}

@media (max-width: 768px) {
    .steps-visual {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .step-item {
        flex: 0 0 calc(33.333% - 0.3rem);
        padding: 0.5rem 0.25rem;
    }

    .step-item::after {
        display: none;
    }

    .step-circle {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .step-title {
        font-size: 0.7rem;
    }
}

/* Dashboard Company Card Progress Indicators */
.company-action .step-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a5f7a;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.company-action .step-badge-light {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}


.company-action.locked-action {
    background: #f8fafc;
    color: #475569;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%) !important;
    border-radius: 0 !important;
}

.company-action.locked-action:first-child {
    background: #f8fafc;
    color: #475569;
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%, 0 calc(100% - 6px), 6px calc(100% - 6px), 0 100%, 0 0, 0 6px, 6px 6px, 0 0) !important;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 8px) 100%, 0 100%, 0 6px) !important;
    border-radius: 6px 0 0 6px !important;
}

.company-action.locked-action:last-child {
    background: #f8fafc;
    color: #475569;
    clip-path: polygon(8px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%) !important;
    border-radius: 0 6px 6px 0 !important;
}

.company-action.locked-action::before,
.company-action.locked-action::after,
.company-action.locked-action:first-child::before,
.company-action.locked-action:first-child::after,
.company-action.locked-action:last-child::before,
.company-action.locked-action:last-child::after {
    display: none !important;
}

.company-action.locked-action:hover {
    background: #d1fae5;
    color: #047857;
}

.company-overall-percent {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.company-overall-percent.complete {
    background: #d1fae5;
    color: #047857;
}

.company-overall-percent.partial {
    background: #fef3c7;
    color: #b45309;
}

.company-overall-percent.low {
    background: #fee2e2;
    color: #b91c1c;
}

.company-action.flex-grow-2 {
    flex: 2;
}

/* Container wide utility */
.container-wide {
    max-width: 1100px;
}

/* ============================================
   DASHBOARD INDEX PAGE STYLES
   (Extracted from Dashboard/Index.cshtml)
   ============================================ */

.search-box {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    color: white;
    margin-bottom: 2rem;
}

.search-box h5 {
    color: white;
    font-weight: 600;
}

.search-box .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.search-input {
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 1.25rem;
    letter-spacing: 2px;
    padding: 0.75rem 1rem;
}

.search-input:focus {
    box-shadow: none;
    outline: none;
}

.search-btn {
    background: #fbbf24;
    border: none;
    border-radius: 0 8px 8px 0;
    color: #1f2937;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    min-width: 230px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #f59e0b;
    color: #1f2937;
}

.search-btn:disabled {
    background: #fbbf24;
    color: #1f2937;
    opacity: 0.85;
    cursor: wait;
}

.search-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

@media (max-width: 576px) {
    .search-btn {
        min-width: auto;
        padding: 0.75rem 1rem;
    }
    .search-btn .search-text {
        display: none;
    }
}

.company-card {
    background: #fafffe;
    border: 1px solid #b0c9d2;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(26, 95, 122, 0.15);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.company-card:hover {
    border-color: #134a5e;
    box-shadow: 0 4px 12px rgba(26, 95, 122, 0.25);
}

.company-card-body {
    padding: 1rem 1.25rem;
}

.company-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.company-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.company-eik {
    font-size: 0.85rem;
}

.company-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.company-detail-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.company-detail-item i {
    font-size: 0.9rem;
    color: #9ca3af;
}

@media (max-width: 576px) {
    .company-header {
        flex-direction: column;
        gap: 0.15rem;
    }
    .company-details {
        gap: 0.35rem 0.75rem;
    }
}

.company-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
}

.company-status.submitted { background: #dbeafe; color: #1d4ed8; }
.company-status.review { background: #fef3c7; color: #b45309; }
.company-status.approved { background: #d1fae5; color: #047857; }
.company-status.rejected { background: #fee2e2; color: #b91c1c; }
.company-status.corrections { background: #fef3c7; color: #b45309; }

.company-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f3f4f6;
}

.company-info-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #6b7280;
    font-size: 0.8rem;
}

.validated-badge {
    background: #d1fae5;
    color: #047857;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.company-card-footer {
    background: #f3f4f6;
    position: relative;
}

.locked-divider {
    height: 1px;
    background: #cddfe6;
    margin: 0;
}

.progress-track {
    display: flex;
    position: absolute;
    top: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    gap: 4px;
    padding: 0;
}

.progress-segment {
    flex: 1;
    background: #d1d5db;
    border-radius: 0;
    overflow: hidden;    
    margin-right: 11px;
}

.progress-segment.submit-segment {
    background: #1a5f7a;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.progress-fill.complete {
    background: #10b981;
}

.progress-fill.partial {
    background: #f59e0b;
}

.progress-fill.empty {
    background: transparent;
}

.company-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 0.5rem;
    width: 100%;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}

.company-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 0.5rem;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.15s ease;
    position: relative;
    cursor: pointer;
    background: #ffffff;
    border: none;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
}

.company-action::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -13px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 23px 0 23px 13px;
    border-color: transparent transparent transparent #1a5f7a;
    z-index: 11;
}

.company-action::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 20px 0 20px 11px;
    border-color: transparent transparent transparent #ffffff;
    z-index: 12;
    transition: border-color 0.15s ease;
}

.company-action:first-child {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    border-radius: 6px 0 0 6px;
}

.company-action:last-child {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
    border-radius: 0 6px 6px 0;
}

.company-action:last-child::before,
.company-action:last-child::after {
    display: none;
}


.company-action:hover {
    background: #d1fae5;
    color: #047857;
}

.company-action:hover::after {
    border-color: transparent transparent transparent #d1fae5;
}


.company-action:active {
    background: #a7f3d0;
}

.company-action.primary {
    color: #047857;
    background: #ecfdf5;
}

.company-action.primary::after {
    border-color: transparent transparent transparent #ecfdf5;
}

.company-action.primary:hover {
    background: #d1fae5;
}

.company-action.primary:hover::after {
    border-color: transparent transparent transparent #d1fae5;
}

.company-action.submit-action {
    background: #1a5f7a;
    color: white;
    font-weight: 600;
}

.company-action.submit-action::before,
.company-action.submit-action::after {
    display: none;
}

.company-action.submit-action:hover {
    background: #159895;
    color: white;
}

.company-action.submit-action:active {
    background: #134a5e;
}

.company-action.report-action {
    background: #1a5f7a;
    color: white;
    font-weight: 600;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%) !important;
    border-radius: 0 6px 6px 0 !important;
}

.company-action.report-action::before,
.company-action.report-action::after {
    display: none !important;
}

.company-action.report-action:hover {
    background: #159895;
    color: white;
}


.company-action i {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    transition: transform 0.2s ease;
}

.company-action:hover i {
    transform: scale(1.15);
}

/* Mobile: hide action text, show only icons */
@media (max-width: 575.98px) {
    .company-actions {
        gap: 3px;
        padding: 0.4rem;
    }
    
    .progress-track {
        left: 0.4rem;
        right: 0.4rem;
        gap: 3px;
    }
    
    .company-action {
        padding: 0.55rem 0.35rem;
        clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%, 7px 50%);
    }
    
    .company-action:first-child {
        clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
    }
    
    .company-action:last-child {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 7px 50%);
    }
    
    .company-action > span:not(.step-badge):not(.step-badge-light) {
        display: none;
    }
    
    .company-action i {
        font-size: 1.15rem;
        margin-bottom: 0;
    }
    
    .company-action .step-badge,
    .company-action .step-badge-light {
        font-size: 0.55rem;
        width: 13px;
        height: 13px;
        top: 2px;
        left: 2px;
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1f2937;
}

.section-count {
    background: #e5e7eb;
    color: #374151;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

.preview-box {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.preview-box.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.preview-box.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.preview-box.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.empty-state {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* ============================================
   DASHBOARD DOCUMENTS PAGE STYLES
   (Extracted from Dashboard/Documents.cshtml)
   ============================================ */

.page-header {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.page-header h4 {
    color: white;
    margin: 0;
}

.company-doc-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s;
}

.company-doc-card:hover {
    border-color: #57c5b6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.company-doc-card .company-info {
    flex: 1;
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.company-doc-card .company-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.company-doc-card .company-eik {
    font-size: 0.8rem;
    color: #6b7280;
    font-family: monospace;
}

.doc-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.doc-badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.doc-badge.complete {
    background: #ecfdf5;
    color: #047857;
}

.doc-badge.incomplete {
    background: #fef3c7;
    color: #92400e;
}

.btn-docs {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
}

.btn-docs:hover {
    background: linear-gradient(135deg, #145068 0%, #128884 100%);
    color: white;
}

.btn-docs-lg {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Mobile responsive for Documents page */
@media (max-width: 575.98px) {
    .company-doc-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .company-doc-card .company-info {
        text-align: left;
    }
    
    .company-doc-card .company-name {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .doc-status {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .btn-docs {
        flex-shrink: 0;
    }
}

/* ============================================
   TICKET CREATE PAGE STYLES
   (Extracted from Ticket/Create.cshtml)
   ============================================ */

.type-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    padding: 0.75rem !important;
}

.type-card:hover {
    border-color: #57c5b6;
    background: #f0fdfa;
}

.type-card.selected {
    border-color: #1a5f7a;
    background: #f0f9ff;
}

.type-card .icon-change {
    color: #f59e0b;
}

.type-card .icon-inquiry {
    color: #159895;
}

.type-card i {
    font-size: 1.25rem !important;
    margin-bottom: 0.25rem !important;
}

.type-card strong {
    font-size: 0.9rem;
}

.type-card small {
    font-size: 0.75rem;
    line-height: 1.3;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #164e66 0%, #0f7c7c 100%);
    color: white;
}

.form-container {
    max-width: 100%;
    margin: 0 auto;
}

.help-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .form-container .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-container .d-flex.justify-content-between .btn, 
    .form-container .d-flex.justify-content-between .btn-submit {
        width: 100%;
    }
    
    .form-container .d-flex.justify-content-between .btn-submit {
        order: -1;
    }
}

/* ============================================
   TICKET INDEX (LIST) PAGE STYLES
   (Extracted from Ticket/Index.cshtml)
   ============================================ */

.inbox-container {
    max-width: 100%;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h4 {
    font-size: 1.1rem;
}

/* Ticket header - white text on gradient */
.page-header.ticket-header h4 a {
    color: white;
}

.page-header.ticket-header h4 a:hover {
    color: rgba(255,255,255,0.85);
}

.btn-new {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-new:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

.message-list {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.message-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.message-item:hover {
    background: #f0fdfa;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item.unread {
    background: #f0f9ff;
    border-left: 3px solid #1a5f7a;
}

.message-item.unread .message-subject {
    font-weight: 600;
    color: #1a5f7a;
}

.message-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.85rem;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.message-icon.new {
    background: #fef3c7;
    color: #d97706;
}

.message-icon.in-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.message-icon.answered {
    background: #d1fae5;
    color: #059669;
}

.message-icon.closed {
    background: #f3f4f6;
    color: #6b7280;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-subject {
    font-size: 0.9rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.message-preview {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-date {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    margin-left: 0.75rem;
    text-align: right;
}

.message-date .time {
    display: block;
    font-size: 0.7rem;
}

.empty-inbox {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-inbox i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #57c5b6;
    opacity: 0.6;
}

.btn-outline-theme {
    border: 1px solid #1a5f7a;
    color: #1a5f7a;
    border-radius: 6px;
    background: transparent;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.btn-outline-theme:hover {
    background: #1a5f7a;
    color: white;
}

@media (max-width: 576px) {
    .page-header {
        padding: 1rem;
    }

    .page-header h4 {
        font-size: 1rem;
    }

    .message-item {
        padding: 0.75rem;
    }

    .message-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin-right: 0.65rem;
    }

    .message-subject {
        font-size: 0.85rem;
    }

    .message-date .time {
        display: none;
    }
}

/* ============================================
   LAYOUT STYLES
   (Extracted from _Layout.cshtml)
   ============================================ */

:root {
    --primary-color: #1a5f7a;
    --secondary-color: #159895;
    --accent-color: #57c5b6;
    --bg-gradient: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Modern Navbar Styles */
.navbar {
    background: white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a5f7a !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: #159895 !important;
}

.brand-icon {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav-pills-custom {
    display: flex;
    gap: 0.1rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 12px;
}

.nav-pills-custom .nav-link {
    color: #64748b;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.nav-pills-custom .nav-link:hover {
    color: #1a5f7a;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-pills-custom .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    box-shadow: 0 2px 4px rgba(26, 95, 122, 0.3);
}

.nav-pills-custom .nav-link i {
    font-size: 0.95rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-menu .nav-link {
    color: #475569;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-menu .nav-link:hover {
    color: #1a5f7a;
    background: #f1f5f9;
}

.user-menu .dropdown-toggle::after {
    margin-left: 0.3rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-size: 0.9rem;
}

.btn-login,
.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-login {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    color: white;
}

.btn-login:hover {
    background: linear-gradient(135deg, #164e66 0%, #0f7c7c 100%);
    color: white;
}

.btn-register {
    background: white;
    color: #475569;
    border-color: #d1d5db;
}

.btn-register:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #9ca3af;
}

.btn-primary-action {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    color: white;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-primary-action:hover {
    background: linear-gradient(135deg, #164e66 0%, #0f7c7c 100%);
    color: white;
}

.btn-primary-action:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.logo-partner {
    height: 32px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.logo-partner:hover {
    opacity: 1;
}

.dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.navbar-toggler {
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231a5f7a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.btn-primary {
    background: var(--bg-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #145068 0%, #128884 100%);
}

.table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.badge-status {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

.stat-card {
    border-left: 4px solid var(--accent-color);
}

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

.stat-card .stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.mock-badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.app-main {
    flex: 1;
}

/* Mobile Responsive Global Styles */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .nav-pills-custom {
        flex-direction: column;
        background: transparent;
        padding: 0;
        gap: 0.25rem;
    }
    
    .nav-pills-custom .nav-link {
        background: #f1f5f9;
        justify-content: flex-start;
    }
    
    .nav-pills-custom .nav-link.active {
        background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    }
    
    .user-menu {
        flex-direction: column;
        align-items: stretch;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #e2e8f0;
        gap: 0.5rem;
    }
    
    .user-menu .nav-link {
        justify-content: flex-start;
    }
    
    .user-menu .nav-item {
        width: 100%;
    }
    
    .user-menu .btn-login,
    .user-menu .btn-register {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.65rem 1rem;
        margin: 0;
    }
    
    .logo-partner {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 0.95rem;
    }
    
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    /* Stat cards */
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    /* Table responsive */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Form controls */
    .form-control, .form-select {
        font-size: 16px;
    }
    
    /* Cards */
    .card {
        border-radius: 8px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 0.85rem;
    }
    
    .navbar-brand span:not(.brand-icon) {
        display: none;
    }
    
    .navbar-brand .brand-icon {
        display: flex;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
}

/* Print Styles - hide site chrome */
@media print {
    .navbar,
    #toast-container,
    .company-footer,
    .footer,
    .no-print,
    #developmentWarningBanner {
        display: none !important;
    }
    .app-main {
        padding: 0 !important;
        margin: 0 !important;
    }
    .app-main > .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Toast Animation */
@keyframes toastSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastSlideOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-20px); opacity: 0; } }

/* ============================================
   TICKET DETAILS PAGE STYLES
   (Extracted from Ticket/Details.cshtml)
   ============================================ */

.thread-container {
    max-width: 100%;
    margin: 0 auto;
}

.back-link {
    font-size: 0.85rem;
    color: #1a5f7a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}

.back-link:hover {
    color: #159895;
}

.thread-header {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    color: #374151;
    margin-bottom: 1.5rem;
}

.thread-subject {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.thread-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.new { background: #fbbf24; }
.status-dot.in-progress { background: #57c5b6; }
.status-dot.answered { background: #34d399; }
.status-dot.closed { background: rgba(255,255,255,0.5); }

/* Original request (main ticket) */
.original-request {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.original-request-label {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.original-request-label-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.original-request-label-right {
    display: flex;
    align-items: center;
}

.original-request-label .status-badge-light {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.original-request-label .ticket-number {
    font-family: monospace;
    opacity: 0.9;
}

.original-request-label .separator {
    opacity: 0.6;
}

.original-request-content {
    padding: 1.25rem 1.5rem;
}

.original-request-subject {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.original-request-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    margin-bottom: 0.75rem;
}

.original-request-attachments {
    padding: 0.75rem 0;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
}

.original-request-attachments .attachment-link {
    display: inline-flex;
    align-items: center;
    color: #1a5f7a;
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.original-request-attachments .attachment-link:hover {
    background: #f0f9ff;
}

/* Correspondence section */
.correspondence-section {
}

.correspondence-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.messages-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.message {
    border-bottom: 1px solid #f3f4f6;
}

.message:last-child {
    border-bottom: none;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}

.message-sender {
    font-weight: 600;
    color: #1a5f7a;
}

.message-body {
    padding: 1.25rem;
    font-size: 0.9rem;
    white-space: pre-wrap;
    line-height: 1.7;
    color: #374151;
}

.message.admin .message-header {
    background: #ecfdf5;
    border-bottom-color: #d1fae5;
}

.message.admin .message-sender {
    color: #047857;
}

/* Unread message styles */
.message.unread {
    background: #f0f9ff;
    border-left: 3px solid #047857;
}

.message.unread .message-header {
    background: #ecfdf5;
}

.message.unread.admin .message-header {
    background: #d1fae5;
}

.reply-form {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.reply-form textarea {
    border: none;
    resize: none;
    font-size: 0.9rem;
    padding: 1rem 1.25rem;
}

.reply-form textarea:focus {
    box-shadow: none;
    outline: none;
}

/* Reply section */
.reply-section {
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.reply-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
}

.reply-form .tox-tinymce {
    border-radius: 8px 8px 0 0 !important;
    border: 1px solid #e5e7eb !important;
    border-bottom: none !important;
}

.attachments-section {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.attachments-list:empty {
    margin-bottom: 0;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 20px;
    padding: 0.25rem 0.5rem 0.25rem 0.75rem;
    font-size: 0.8rem;
    color: #2e7d32;
}

.attachment-chip .file-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-chip .remove-btn {
    background: none;
    border: none;
    color: #666;
    padding: 0 0.25rem;
    margin-left: 0.25rem;
    cursor: pointer;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.15s;
}

.attachment-chip .remove-btn:hover {
    color: #c62828;
    background: rgba(198, 40, 40, 0.1);
}

.add-attachment-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border: 1px dashed #ccc;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.add-attachment-btn:hover {
    border-color: #1a5f7a;
    color: #1a5f7a;
    background: #f0f9ff;
}

.attachment-hint {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

.reply-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-theme {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.btn-theme:hover {
    background: linear-gradient(135deg, #145068 0%, #128884 100%);
    color: white;
}

.info-panel {
    font-size: 0.8rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.info-panel dt {
    color: #6b7280;
    font-weight: normal;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-panel dd {
    margin-bottom: 0;
    color: #1f2937;
}

.closed-notice {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
    font-size: 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.no-reply-notice {
    text-align: center;
    padding: 1rem;
    color: #9ca3af;
    font-size: 0.8rem;
}

.no-reply-notice i {
    font-size: 1rem !important;
    margin-bottom: 0.25rem !important;
}

@media (max-width: 576px) {
    .thread-header {
        padding: 1.25rem;
    }

    .thread-subject {
        font-size: 1.1rem;
    }

    .message-body {
        padding: 1rem;
    }
}

#alertModal .modal-content,
#confirmModal .modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

#alertModal .modal-header,
#confirmModal .modal-header {
    padding: 1rem 1.5rem;
    background: #2a9d8f;
    color: var(--color-white);
    border-bottom: none;
    min-height: 56px;
    align-items: center;
}

#alertModal .modal-header .btn-close,
#confirmModal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#alertModal .modal-header .btn-close:hover,
#confirmModal .modal-header .btn-close:hover {
    opacity: 1;
}

#alertModal .modal-title,
#confirmModal .modal-title {
    color: var(--color-white);
    display: flex;
    align-items: center;
}

#alertModal .modal-title i,
#confirmModal .modal-title i {
    color: var(--color-white) !important;
    font-size: 1.2rem;
}

#alertModal .modal-body,
#confirmModal .modal-body {
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    color: var(--color-dark);
}

#alertModal .modal-footer,
#confirmModal .modal-footer {
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: none;
}

#alertModal .modal-footer .btn,
#confirmModal .modal-footer .btn {
    min-width: 100px;
    padding: 0.5rem 1.25rem;
}

#alertModal .btn-primary,
#confirmModal .btn-primary {
    background-color: #2a9d8f;
    border-color: #2a9d8f;
}

#alertModal .btn-primary:hover,
#confirmModal .btn-primary:hover {
    background-color: #238b7e;
    border-color: #238b7e;
}

#confirmModal .btn-outline-secondary {
    border-color: var(--color-border);
    color: var(--color-dark);
}

#confirmModal .btn-outline-secondary:hover {
    background-color: var(--color-light);
    border-color: var(--color-border);
    color: var(--color-dark);
}

.confirm-modal-danger #confirmModalOkBtn { 
    background-color: var(--color-danger); 
    border-color: var(--color-danger); 
}

.confirm-modal-danger #confirmModalOkBtn:hover { 
    background-color: #a32020;
    border-color: #a32020;
}

/* ============================================
   APPLICATION HISTORY (Company) PAGE
   ============================================ */

.back-link {
    color: #64748b;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.back-link:hover {
    color: #334155;
}

.application-history-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.application-history-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px 10px 0 0;
}
.application-history-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
.company-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.35rem;
}
.company-subtitle .separator {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

.application-history-body {
    padding: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}
.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 1rem;
}
.empty-state p {
    color: #64748b;
    margin-bottom: 1rem;
}

.application-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.application-item:last-child {
    margin-bottom: 0;
}
.application-item:hover {
    border-color: #1a5f7a;
    box-shadow: 0 4px 12px rgba(26, 95, 122, 0.1);
}

.application-item-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    padding: 1rem 1.25rem;
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
}

.application-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.application-number {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    background: #f1f5f9;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    letter-spacing: 0.025em;
}

.application-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.application-status.status-primary { background: #dbeafe; color: #1e40af; }
.application-status.status-info { background: #e0f2fe; color: #0369a1; }
.application-status.status-success { background: #dcfce7; color: #166534; }
.application-status.status-danger { background: #fee2e2; color: #991b1b; }
.application-status.status-warning { background: #fef3c7; color: #92400e; }
.application-status.status-secondary { background: #f1f5f9; color: #475569; }

.application-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #64748b;
}
.application-meta i {
    font-size: 0.75rem;
}

.application-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    font-size: 0.8125rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}
.btn-action i {
    font-size: 0.875rem;
}

.admin-comment {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
}
.admin-comment-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
}
.admin-comment-text {
    font-size: 0.8125rem;
    color: #78350f;
}
.admin-comment-meta {
    font-size: 0.75rem;
    color: #a16207;
    margin-top: 0.375rem;
    font-style: italic;
}

.application-details {
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px dashed #e2e8f0;
}

@media (min-width: 992px) {
    .application-details .row.g-3 {
        align-items: stretch;
    }
    .application-details .row.g-3 > .col-lg-6 {
        display: flex;
        flex-direction: column;
    }
    .application-details .row.g-3 > .col-lg-6 > .detail-block:last-child {
        flex: 1 1 auto;
    }
}

.detail-block {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}
.detail-block:last-child {
    margin-bottom: 0;
}

.detail-block-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.detail-block-title i {
    margin-right: 0.25rem;
}

.summary-table {
    font-size: 0.8125rem;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.summary-row:last-child {
    border-bottom: none;
}
.summary-row .label {
    color: #64748b;
    flex-shrink: 0;
    min-width: 10rem;
}

.declarations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.25rem 0.75rem;
    font-size: 0.75rem;
}
.decl-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
}
.decl-item.accepted {
    color: #166534;
}
.decl-item.accepted i {
    color: #22c55e;
    font-size: 0.8rem;
}
.decl-item.not-accepted {
    color: #991b1b;
}
.decl-item.not-accepted i {
    color: #ef4444;
    font-size: 0.8rem;
}

.detail-block-vehicles {
    width: 100%;
}
.detail-block-vehicles .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.application-details .vehicles-table {
    font-size: 0.8125rem;
    margin-bottom: 0;
    min-width: 100%;
}
.application-details .vehicles-table th {
    font-weight: 600;
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.application-details .vehicles-table td {
    vertical-align: middle;
}
.application-details .badge-owner {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 500;
}
.application-details .badge-user {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
}

.doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
}
.doc-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.doc-list-item:last-child {
    border-bottom: none;
}
.doc-list-item > div {
    min-width: 0;
    flex: 1;
}
.doc-type-name {
    display: inline;
    font-weight: 500;
    color: #334155;
}
.doc-file-name {
    display: inline;
    color: #64748b;
    font-size: 0.7rem;
}
.doc-file-name::before {
    content: ' · ';
    color: #cbd5e1;
}
.doc-size {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    color: #94a3b8;
}

.detail-block-documents {
    display: flex;
    flex-direction: column;
}
.detail-block-documents .doc-list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.detail-block-documents .doc-list-item {
    flex: 1 1 0;
    align-items: stretch;
    padding: 0;
    min-height: 2.5rem;
}
.doc-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.doc-download:hover,
.doc-download:focus {
    background: #eff6ff;
    color: #1e40af;
}
.doc-download-icon {
    font-size: 1.05rem;
    color: #64748b;
    flex-shrink: 0;
}
.doc-download:hover .doc-download-icon,
.doc-download:focus .doc-download-icon {
    color: #1e40af;
}
.doc-info {
    min-width: 0;
    flex: 1;
}

@media (max-width: 991.98px) {
    .application-details .row.g-3 > [class*='col-'] {
        margin-bottom: 0.5rem;
    }
    .detail-block {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }
    .detail-block-title {
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
    }
    .declarations-grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
    .doc-list-item {
        padding: 0.2rem 0;
    }
    .doc-type-name,
    .doc-file-name {
        display: block;
    }
    .doc-file-name::before {
        content: none;
    }
    .vehicles-wrap {
        overflow: visible;
    }
    .vehicles-wrap .vehicles-table,
    .vehicles-wrap .vehicles-table thead,
    .vehicles-wrap .vehicles-table tbody,
    .vehicles-wrap .vehicles-table tr {
        display: block;
    }
    .vehicles-wrap .vehicles-table thead tr {
        position: absolute;
        left: -9999px;
    }
    .vehicles-wrap .vehicles-table tbody tr {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
        background: #f8fafc;
    }
    .vehicles-wrap .vehicles-table tbody tr:last-child {
        margin-bottom: 0;
    }
    .vehicles-wrap .vehicles-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.35rem 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
    }
    .vehicles-wrap .vehicles-table td:last-child {
        border-bottom: none;
    }
    .vehicles-wrap .vehicles-table td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        flex-shrink: 0;
    }
    .vehicles-wrap .vehicles-table td .badge {
        margin-left: auto;
    }
}

/* ============================================
   INSTRUCTIONS PAGE
   ============================================ */

.guide-content .indent-1 {
    margin-left: 2rem;
}
.guide-content .indent-2 {
    margin-left: 4rem;
}

/* ============================================
   PROFILE PAGE (Dashboard)
   ============================================ */

.profile-header {
    background: linear-gradient(135deg, #1a5f7a 0%, #159895 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.profile-email {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.profile-member-since {
    opacity: 0.85;
    font-size: 0.9rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
}

.stat-icon.companies { background: #dbeafe; color: #2563eb; }
.stat-icon.vehicles { background: #fef3c7; color: #d97706; }
.stat-icon.tickets { background: #f3e8ff; color: #9333ea; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.85rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.info-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-body {
    padding: 1.25rem;
}

.profile-page .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.profile-page .info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-page .info-row:first-child {
    padding-top: 0;
}

.profile-page .info-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.profile-page .info-value {
    font-weight: 500;
    color: #1f2937;
}

.security-card {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
}

.security-card .info-card-header {
    border-bottom-color: #fde047;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-link:hover {
    background: #1a5f7a;
    border-color: #1a5f7a;
    color: white;
}

@media (max-width: 575.98px) {
    .profile-header {
        padding: 1.5rem;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .profile-page .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

.vehicle-import .vi-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem 0 0.75rem;
    color: #6c757d;
    font-size: 0.78rem;
}
.vehicle-import .vi-divider::before,
.vehicle-import .vi-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #dee2e6;
}

.vehicle-import .vi-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.vehicle-import .vi-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.83rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.vehicle-import .vi-btn i {
    font-size: 1rem;
}
.vehicle-import .vi-btn-upload {
    background: #e8f1f5;
    border-color: #a3c4d2;
    color: #14506a;
}
.vehicle-import .vi-btn-upload:hover {
    background: #1a5f7a;
    border-color: #1a5f7a;
    color: #ffffff;
}
.vehicle-import .vi-btn-template {
    background: #ffffff;
    border-color: #ced4da;
    color: #495057;
}
.vehicle-import .vi-btn-template:hover {
    background: #f1f3f5;
    border-color: #adb5bd;
    color: #212529;
}
.vehicle-import .btn-group .vi-btn-template.dropdown-toggle-split {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}
.vehicle-import .vi-hint {
    margin-top: 0.7rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #6c757d;
}
.vehicle-import .vi-errors {
    max-height: 260px;
    overflow-y: auto;
}
.vehicle-status-pending {
    color: #b8860b;
}
.vehicle-status-failed {
    color: #c62828;
}

.vehicle-import .vi-result-inner {
    position: relative;
    padding-right: 1.9rem;
}
.vehicle-import .vi-result-inner .vi-close {
    position: absolute;
    top: 0.6rem;
    right: 0.15rem;
    font-size: 0.7rem;
}
.vehicle-import .vi-errors {
    max-height: 320px;
}

.vehicle-import .vi-error-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
    column-gap: 1.5rem;
}
.vehicle-import .vi-error-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f3f5;
}
.vehicle-import .vi-error-list li:last-child {
    border-bottom: 0;
}
.vehicle-import .vi-error-head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex: 0 0 auto;
}
.vehicle-import .vi-error-row {
    color: #adb5bd;
    white-space: nowrap;
}
.vehicle-import .vi-error-reg {
    font-family: var(--bs-font-monospace, monospace);
    font-weight: 600;
    color: #212529;
}
.vehicle-import .vi-error-msg {
    flex: 1 1 15rem;
    color: #6c757d;
}

.vehicle-import .vi-btn-clear {
    background: #ffffff;
    border-color: #f1aeb5;
    color: #b02a37;
}
.vehicle-import .vi-btn-clear:hover {
    background: #b02a37;
    border-color: #b02a37;
    color: #ffffff;
}
.vehicle-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vehicle-clear {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.vehicle-clear .vi-btn-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.83rem;
    font-weight: 600;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #f1aeb5;
    color: #b02a37;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.vehicle-clear .vi-btn-clear:hover {
    background: #b02a37;
    border-color: #b02a37;
    color: #ffffff;
}

.navbar .user-email {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
