/* Mobile-first base styles */
:root {
    /* Hlavní barvy */
    --primary-color: #2d5587;
    --primary-dark: #163559;
    --primary-darker: #191f2c;
    --secondary-color: #f6f6f6;
    --text-dark: #282828;
    
    /* Gradienty */
    --gradient-primary: linear-gradient(135deg, #2d5587 0%, #163559 50%, #191f2c 100%);
    --gradient-light: linear-gradient(135deg, #2d5587 0%, #163559 100%);
    --gradient-dark: linear-gradient(135deg, #163559 0%, #191f2c 100%);
    
    /* Doprovodné barvy */
    --text-color: #282828;
    --text-light: #666;
    --text-muted: #999;
    --border-color: #e0e0e0;
    --background-light: #f6f6f6;
    --background-white: #ffffff;
    --background-card: #ffffff;
    
    /* Stavové barvy */
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #28a745;
    --info-color: #2d5587;
    
    /* Stíny */
    --shadow-light: 0 2px 8px rgba(45, 85, 135, 0.1);
    --shadow-medium: 0 4px 16px rgba(45, 85, 135, 0.15);
    --shadow-heavy: 0 8px 24px rgba(45, 85, 135, 0.2);
    
    /* Fonty */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base styles for mobile */
* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-touch-callout: none;
    box-sizing: border-box;
}

/* Prevent horizontal scrolling on mobile */
@media (max-width: 991px) {
    * {
        max-width: 100vw;
    }
    
    .container, .container-fluid {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Force all elements to stay within viewport */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Fix any elements that might cause horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw;
    }
    
    /* Fix specific problematic elements */
    .ui-autocomplete {
        max-width: calc(100vw - 32px) !important;
    }
    
    .sort-dropdown {
        max-width: calc(100vw - 24px) !important;
    }
    
    .dropdown-menu {
        max-width: calc(100vw - 24px) !important;
    }
    
    /* Ensure all content fits */
    .card, .form-control, .btn, .nav-item {
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* Force all elements to stay within viewport */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Fix any wide elements */
    .container, .container-fluid, .row {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Fix navigation elements */
    .nav-wrapper {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Fix mobile menu */
    .mobile-menu {
        max-width: 100vw !important;
    }
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-light);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    max-width: 100vw;
}

/* iOS Safari scroll stability: avoid background-attachment: fixed on mobile */
@media (max-width: 991px) {
    body {
        background-attachment: scroll;
    }
}

#container {}

#content {
    padding: 20px;
    margin: 0;
    background: var(--background-white);
    border-radius: 0;
    box-shadow: none;
    min-height: calc(100vh - 200px);
    padding-bottom: 80px; /* Space for bottom nav on mobile */
    padding-top: 90px; /* Space for sticky header on mobile */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #content h2 {
        margin-top: 0 !important;
        padding-top: 0;
    }
}

@media (min-width: 992px) {
    #content {
        padding-bottom: 20px; /* Reset on desktop */
        padding-top: 20px;
    }
}

/* Tablet */
@media (min-width: 768px) {
    #container {}
    
    #content {
        margin: 24px 0;
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.06);
        padding-top: 40px;
    }
}

/* Desktop - MacBook Air and similar (1366-1440px) */
@media (min-width: 992px) {
    #container {}
    
    #content {
        margin: 24px 0;
    }
}

/* Medium Desktop - Standard laptops */
@media (min-width: 1200px) {
    #container {}
    
    #content {
        margin: 32px 0;
    }
}

/* Large Desktop */
@media (min-width: 1600px) {
    #container {}
    
    #content {
        padding: 56px 88px;
        margin: 40px 0;
    }
}

/* Extra Large - cap at reasonable width */
@media (min-width: 1800px) {
    #container {}
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
    color: var(--primary-color);
    letter-spacing: -0.01em;
    font-weight: 600;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    h2 {
        font-size: 1.85rem;
        margin-bottom: 3rem;
    }
    
    h3 {
        font-size: 1.45rem;
        margin-bottom: 2.25rem;
        margin-top: 64px;
    }
}

@media (min-width: 1200px) {
    h2 {
        font-size: 2rem;
        margin-bottom: 3.5rem;
    }
    
    h3 {
        font-size: 1.6rem;
        margin-bottom: 2.5rem;
        margin-top: 72px;
    }
}

/* Forms - Mobile optimized */
.form-control {
    height: 48px;
    min-height: 44px; /* iOS minimum touch target */
    font-size: 16px; /* Prevent iOS zoom on focus */
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(23, 65, 117, 0.1);
    outline: none;
}

.form-control-sm {
    height: 40px;
    min-height: 40px;
    font-size: 15px;
    padding: 8px 12px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

input[type="number"].form-control {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-row {
    margin: 0 -0.5rem;
}

.form-row > [class*="col-"] {
    padding: 0 0.5rem;
}

.row {
    margin: 0 -0.75rem;
}

.row > [class*="col-"] {
    padding: 0 0.75rem;
}

@media (min-width: 1200px) {
    .row {
        margin: 0 -1rem;
    }
    
    .row > [class*="col-"] {
        padding: 0 1rem;
    }
}

/* Buttons - Mobile optimized */
.btn {
    height: 52px;
    min-height: 44px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

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

.btn-light {
    background-color: #fff;
    color: var(--primary-color);
}

.btn-light:hover,
.btn-light:focus {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

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

.btn-sm {
    height: 40px;
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
}

/* Responsive Form Grid */
.responsive-form-grid,
.mobile-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.responsive-form-grid .form-group,
.mobile-form-grid .form-group {
    margin-bottom: 0;
}

.responsive-form-grid label,
.mobile-form-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
}

.responsive-form-grid .row,
.mobile-form-grid .row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0;
}

/* Tablet - 2 columns for some fields */
@media (min-width: 768px) {
    .responsive-form-grid,
    .mobile-form-grid {
        gap: 1.25rem;
    }
    
    .responsive-form-grid label,
    .mobile-form-grid label {
        font-size: 14px;
        margin-bottom: 8px;
    }
}

/* Desktop - Optimized layout */
@media (min-width: 992px) {
    .responsive-form-grid,
    .mobile-form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 2rem;
    }
    
    .responsive-form-grid .row,
    .mobile-form-grid .row {
        grid-column: span 2;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Button full width */
    .responsive-form-grid .form-group:last-child,
    .mobile-form-grid .form-group:last-child {
        grid-column: span 2;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .responsive-form-grid,
    .mobile-form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem 2rem;
    }
    
    .responsive-form-grid .row,
    .mobile-form-grid .row {
        grid-column: span 3;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .responsive-form-grid .form-group:last-child,
    .mobile-form-grid .form-group:last-child {
        grid-column: span 3;
    }
}

/* Cards */
.card {
    margin-bottom: 1.75rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.card-body {
    padding: 1.25rem;
}

.card-header {
    background: rgba(23, 65, 117, 0.05);
    border-bottom: 2px solid rgba(23, 65, 117, 0.1);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .card {
        margin-bottom: 2.5rem;
        border-radius: 16px;
    }
    
    .card-body {
        padding: 2rem;
    }
    
    .card-header {
        padding: 18px 24px;
    }
}

@media (min-width: 1200px) {
    .card {
        margin-bottom: 3rem;
    }
    
    .card-body {
        padding: 2.5rem 3rem;
    }
}

/* Tables - Mobile Card Layout */
.table-responsive {
    margin: 0;
    width: 100%;
}

.table {
    margin-bottom: 0;
}

/* Hide table on mobile, show cards instead */
@media (max-width: 767px) {
    .table thead {
        display: none;
    }
    
    .table tbody {
        display: block;
    }
    
    .table tr {
        display: block;
        margin-bottom: 1rem;
        background: #fff;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        font-size: 14px;
    }
    
    .table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        margin-right: 12px;
    }
}

@media (min-width: 768px) {
.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    font-size: 0.875rem;
    }
}

/* Simple Modern Navigation */
.app-nav {
    background: var(--primary-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 70px;
    gap: 24px;
}

@media (min-width: 1800px) {
    .nav-wrapper {
        max-width: 1800px;
    }
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-box {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box i {
    font-size: 22px;
    color: var(--primary-color);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

/* Desktop Menu */
.desktop-menu {
    display: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-item,
.nav-item .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    color: white !important;
    text-decoration: none !important;
    border-radius: 10px;
    transition: all 0.2s;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-item i {
    font-size: 16px;
    color: white;
}

/* Precise hover: avoid double highlight on dropdown container */
.nav-menu .nav-item:not(.dropdown):hover { background: rgba(255,255,255,0.2); color: #fff !important; }
.nav-item.dropdown .dropdown-toggle:hover { background: rgba(255,255,255,0.2); color: #fff !important; }

.nav-item.active {
    background: white;
    color: #174175 !important;
    font-weight: 600;
}

.nav-item.active i {
    color: var(--primary-color);
}

/* Dropdown toggle specific */
.nav-item.dropdown {
    position: relative;
}

.nav-item .dropdown-toggle::after { display: none; }
/* Place dropdown directly under the toggle */
.nav-item.dropdown .dropdown-menu { right: 0; left: auto; top: calc(100% + 8px); margin-top: 0; }

/* User Badge */
.nav-user {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    padding: 10px 18px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 0.92rem;
    max-width: 240px;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-user i {
    font-size: 22px;
    flex-shrink: 0;
}

.nav-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.mobile-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.mobile-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.mobile-item:hover,
.mobile-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.mobile-item.active {
    font-weight: 600;
}

.mobile-item.logout {
    color: #ff6b6b;
}

.mobile-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 12px 0;
}

/* Dropdown */
.app-nav .dropdown-menu {
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.15);
    padding: 10px;
    margin-top: 10px;
    min-width: 260px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
}

.app-nav .dropdown-item {
    padding: 14px 18px;
    color: #333;
    text-decoration: none;
    display: block;
    border-radius: 10px;
    transition: all 0.2s;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.app-nav .dropdown-item:hover { background: #f5f8fc; color: #174175; transform: none; }

.app-nav .dropdown-item.logout {
    color: #dc3545;
    font-weight: 600;
}

.app-nav .dropdown-item.logout:hover {
    background: rgba(220,53,69,0.08);
    color: #c82333;
}

.app-nav .dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 10px 0;
}

/* Ensure visible icons in dropdown */
.app-nav .dropdown-item i { color: #174175; margin-right: 8px; }
.app-nav .dropdown-item.logout, .app-nav .dropdown-item.logout i { color: #dc3545; }

/* Desktop - Show Menu, Hide Toggle */
@media (min-width: 992px) {
    .desktop-menu {
        display: flex;
    }
    
    .nav-user {
        display: flex;
    }
    
    .mobile-toggle {
        display: none;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    .nav-wrapper {
        padding: 0 32px;
        min-height: 72px;
        gap: 32px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .nav-item {
        padding: 12px 20px;
    }
    
    .nav-menu {
        flex: 0 1 auto;
        gap: 6px;
    }
}

/* Large Desktop - Even more space */
@media (min-width: 1200px) {
    .nav-wrapper {
        padding: 0 56px;
        min-height: 76px;
        gap: 48px;
    }
    
    .logo-box {
        width: 48px;
        height: 48px;
    }
    
    .logo-box i {
        font-size: 24px;
    }
    
    .logo-text {
        font-size: 1.35rem;
    }
    
    .nav-menu {
        gap: 8px;
    }
    
    .nav-item {
        padding: 13px 28px;
        font-size: 1rem;
    }
    
    .nav-item i {
        font-size: 17px;
        gap: 10px;
    }
    
    .nav-user {
        padding: 13px 24px;
        font-size: 0.98rem;
        max-width: 300px;
    }
    
    .nav-user span {
        max-width: 220px;
    }
    
    .nav-user i {
        font-size: 24px;
    }
}

/* Mobile - Hide Desktop Menu */
@media (max-width: 991px) {
    .desktop-menu {
        display: none !important;
    }
    
    .nav-user {
        display: none !important;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .nav-wrapper {
        min-height: 64px;
        gap: 16px;
        padding: 0 16px;
        justify-content: space-between;
    }
    
    .mobile-toggle {
        margin-left: auto;
    }
    
    .mobile-toggle:active {
        transform: scale(0.95);
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .logo-text {
        font-size: 1.2rem;
    }
    
    .mobile-item {
        font-size: 1.1rem;
        padding: 18px 24px;
    }
}

/* Pagination */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.5rem 0;
    gap: 8px;
}

.page-item {
    margin: 0;
}

.page-link {
    padding: 10px 16px;
    font-size: 0.875rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: #174175;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(23, 65, 117, 0.2);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: #174175;
    box-shadow: 0 2px 4px rgba(23, 65, 117, 0.3);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* Alerts and Messages */
.alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

/* Filters and Search */
.filter-section {
    margin-bottom: 1rem;
}

.search-box {
    margin-bottom: 1rem;
}

/* Status indicators */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: rgba(23, 65, 117, 0.15);
    color: var(--primary-color);
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Desktop styles */
@media (min-width: 768px) {
    #container {
        max-width: none;
        padding: 0 0rem;
    }

    #content {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .form-control {
        height: 2.75rem;
    }

    .btn {
        height: 2.75rem;
    }

    .table th,
    .table td {
        padding: 1rem;
        font-size: 1rem;
    }

    .navbar {
        padding: 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }
}

/* Large desktop styles */
@media (min-width: 1200px) {
    #container { max-width: none; }

    .form-control {
        height: 3rem;
    }

    .btn {
        height: 3rem;
    }
}

/* Utility classes */
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }

.px-2 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-3 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-4 { padding-left: 2rem !important; padding-right: 2rem !important; }

.py-2 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-3 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

.rounded { border-radius: 8px !important; }
.rounded-lg { border-radius: 12px !important; }
.rounded-xl { border-radius: 16px !important; }

.shadow { box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; }
.shadow-lg { box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important; }

/* Text utilities */
.text-primary { color: #174175 !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #856404 !important; }
.text-info { color: #0c5460 !important; }

.bg-primary { background-color: var(--primary-color) !important; color: white !important; }
.bg-gradient-primary { background: var(--gradient-light) !important; color: white !important; }

/* Font families */
.font-primary { font-family: var(--font-primary) !important; }
.font-secondary { font-family: var(--font-secondary) !important; }

/* Font weights */
.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-medium { font-weight: 500 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-extrabold { font-weight: 800 !important; }

/* Display utilities */
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

/* Gap utilities for flexbox */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Autocomplete improvements for mobile */
.ui-autocomplete {
    max-width: calc(100vw - 32px) !important;
    font-size: 16px;
}

.ui-menu-item {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Sticky elements for mobile */
@media (max-width: 767px) {
    .sticky-mobile {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        padding: 12px;
        margin: -12px -12px 12px -12px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* Better spacing for mobile */
@media (max-width: 767px) {
    .mb-mobile-3 {
        margin-bottom: 1.5rem !important;
    }
    
    .mt-mobile-3 {
        margin-top: 1.5rem !important;
    }
    
    .p-mobile-0 {
        padding: 0 !important;
    }
    
    /* Stack columns on mobile */
    [class*="col-md-"],
    [class*="col-lg-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Mobile section headers */
    .section-header {
        flex-direction: row !important;
        align-items: center !important;
        margin-top: 40px !important;
        margin-bottom: 20px !important;
    }
    
    .section-header h3 {
        font-size: 1.15rem !important;
    }
    
    .section-header > div:first-child {
        flex-shrink: 0;
        width: 44px !important;
        height: 44px !important;
    }
    
    .section-header > div:first-child i {
        font-size: 18px !important;
    }
}

/* Desktop section headers - even more space */
@media (min-width: 768px) {
    .section-header {
        margin-top: 72px !important;
        margin-bottom: 36px !important;
        padding-bottom: 22px !important;
    }
    
    .section-header > div:first-child {
        width: 56px !important;
        height: 56px !important;
        margin-right: 24px !important;
    }
    
    .section-header > div:first-child i {
        font-size: 24px !important;
    }
    
    .section-header h3 {
        font-size: 1.55rem !important;
    }
}

@media (min-width: 1200px) {
    .section-header {
        margin-top: 80px !important;
        margin-bottom: 40px !important;
    }
    
    .section-header h3 {
        font-size: 1.65rem !important;
    }
}

/* Product List Mobile Cards */
@media (max-width: 767px) {
    .align-items-center.row {
        background: white;
        border-radius: 14px;
        padding: 18px;
        margin-bottom: 16px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.08);
        border-left: 5px solid #174175;
    }
    
    .align-items-center.bg-light {
        background: #f8f9fa !important;
        border-left-color: #6c757d;
    }
    
    .align-items-center.bg-warning {
        background: #fff3cd !important;
        border-left-color: #ffc107;
    }
    
    .align-items-center.bg-danger {
        background: #f8d7da !important;
        border-left-color: #dc3545;
    }
}

/* Product List Desktop spacing */
@media (min-width: 768px) {
    .align-items-center.row {
        margin-bottom: 12px;
        padding: 16px 20px;
        border-radius: 10px;
    }
    
    .align-items-center.row .form-control-sm {
        margin: 0 6px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.slide-in {
    animation: slideIn 0.3s ease;
}

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

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

/* Touch feedback */
.touchable {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(23, 65, 117, 0.1);
}

.touchable:active {
    opacity: 0.7;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: #1a5091;
    text-decoration: underline;
}

a:active {
    opacity: 0.7;
}

/* Form elements font */
input, select, textarea, button {
    font-family: var(--font-primary);
}

/* Focus states for accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Better select on mobile */
@media (max-width: 767px) {
    select.form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Input groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group-append {
    margin-left: -1px;
}

.input-group .form-control:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Contact Page Styles - Using unified components */
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 16px;
}

.contact-details h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 14px;
}

.contact-details p {
    color: var(--text-color);
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-item h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
}

.faq-item p {
    color: var(--text-color);
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Print styles */
@media print {
    body {
        background: #fff;
    }

    #container {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    #content {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
} 