/**
 * Trycksaker Inkop Plugin - Reklamco Brand Design
 * Version: 3.0
 * Brand: Reklamco
 */

/* === FONT IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');

/* === CSS VARIABLES - REKLAMCO BRAND === */
:root {
    /* Primary Colors */
    --ti-primary: #f7c433;
    --ti-primary-dark: #e5b32a;
    --ti-primary-light: #fad561;

    /* Background */
    --ti-bg: #f2edd9;
    --ti-bg-light: #f7f4e8;
    --ti-bg-white: #ffffff;

    /* Accent Colors */
    --ti-blue: #4a90d9;
    --ti-green: #5cb85c;
    --ti-orange: #f5a623;
    --ti-red: #e74c3c;

    /* Text Colors */
    --ti-text-dark: #1a1a1a;
    --ti-text: #333333;
    --ti-text-muted: #666666;
    --ti-text-light: #999999;

    /* Status Colors */
    --ti-success: #5cb85c;
    --ti-success-light: #dff0d8;
    --ti-warning: #f5a623;
    --ti-warning-light: #fcf8e3;
    --ti-danger: #e74c3c;
    --ti-danger-light: #f2dede;
    --ti-info: #4a90d9;
    --ti-info-light: #d9edf7;

    /* Borders & Shadows */
    --ti-border: #e0dccf;
    --ti-border-dark: #d4cfbf;
    --ti-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --ti-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --ti-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.15);

    /* Radius */
    --ti-radius: 16px;
    --ti-radius-sm: 8px;
    --ti-radius-lg: 24px;
    --ti-radius-full: 50px;

    /* Transitions */
    --ti-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ti-transition-fast: all 0.15s ease;

    /* Typography */
    --ti-font-heading: 'DM Serif Display', 'Awesome Serif', Georgia, serif;
    --ti-font-body: 'Founders Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === BASE STYLES === */
body {
    background-color: var(--ti-bg) !important;
    font-family: var(--ti-font-body);
    color: var(--ti-text);
    line-height: 1.6;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6,
.ti-heading {
    font-family: var(--ti-font-heading);
    font-weight: 400;
    color: var(--ti-text-dark);
    letter-spacing: -0.02em;
}

/* === DASHBOARD LAYOUT === */
.ti-dashboard {
    font-family: var(--ti-font-body);
    color: var(--ti-text);
    background: var(--ti-bg);
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* === DASHBOARD HEADER === */
.ti-dashboard-header {
    background: var(--ti-primary);
    padding: 48px 40px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.ti-dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ti-dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.ti-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.ti-header-title h1 {
    color: var(--ti-text-dark);
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ti-header-title h1 i {
    font-size: 2rem;
}

.ti-subtitle {
    color: var(--ti-text);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

/* === LOGO === */
.ti-logo {
    max-height: 48px;
    width: auto;
}

/* === BUTTONS - REKLAMCO STYLE === */
.ti-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--ti-font-body);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--ti-radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--ti-transition);
    text-decoration: none;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
}

.ti-btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.ti-btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.ti-btn-primary {
    background: var(--ti-text-dark);
    color: white;
    border-color: var(--ti-text-dark);
}

.ti-btn-primary:hover {
    background: var(--ti-primary);
    color: var(--ti-text-dark);
    border-color: var(--ti-primary);
    transform: translateY(-2px);
    box-shadow: var(--ti-shadow-lg);
    text-decoration: none;
}

.ti-btn-secondary {
    background: transparent;
    color: var(--ti-text-dark);
    border-color: var(--ti-text-dark);
}

.ti-btn-secondary:hover {
    background: var(--ti-text-dark);
    color: white;
    text-decoration: none;
}

.ti-btn-outline {
    background: transparent;
    border: 2px solid var(--ti-border-dark);
    color: var(--ti-text);
}

.ti-btn-outline:hover {
    background: var(--ti-bg-white);
    border-color: var(--ti-text-dark);
    color: var(--ti-text-dark);
    text-decoration: none;
}

.ti-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--ti-radius-sm);
}

.ti-btn-icon.ti-btn-primary {
    background: var(--ti-text-dark);
    color: white;
    border-color: var(--ti-text-dark);
}

.ti-btn-icon.ti-btn-primary:hover {
    background: var(--ti-primary);
    color: var(--ti-text-dark);
    border-color: var(--ti-primary);
}

.ti-btn-icon.ti-btn-success {
    background: var(--ti-success);
    color: white;
    border-color: var(--ti-success);
}

.ti-btn-icon.ti-btn-success:hover {
    background: #4a9c4a;
    border-color: #4a9c4a;
}

.ti-btn-icon.ti-btn-danger {
    background: transparent;
    color: var(--ti-danger);
    border: 2px solid var(--ti-danger);
}

.ti-btn-icon.ti-btn-danger:hover {
    background: var(--ti-danger);
    color: white;
}

/* === STATISTICS CARDS === */
.ti-stats-row {
    max-width: 1400px;
    margin: -40px auto 32px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 2;
}

.ti-stat-card {
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--ti-shadow);
    transition: var(--ti-transition);
    border: 1px solid var(--ti-border);
}

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

.ti-stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--ti-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.ti-stat-blue {
    background: var(--ti-info-light);
    color: var(--ti-blue);
}
.ti-stat-orange {
    background: var(--ti-warning-light);
    color: var(--ti-orange);
}
.ti-stat-green {
    background: var(--ti-success-light);
    color: var(--ti-green);
}
.ti-stat-yellow {
    background: rgba(247, 196, 51, 0.15);
    color: var(--ti-primary-dark);
}

.ti-stat-content {
    display: flex;
    flex-direction: column;
}

.ti-stat-number {
    font-family: var(--ti-font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--ti-text-dark);
    line-height: 1;
}

.ti-stat-label {
    font-size: 14px;
    color: var(--ti-text-muted);
    margin-top: 6px;
}

/* === NAVIGATION TABS === */
.ti-nav-tabs {
    max-width: 1400px;
    margin: 0 auto 24px;
    padding: 0 40px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ti-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--ti-text-muted);
    text-decoration: none;
    transition: var(--ti-transition);
    border: 1px solid var(--ti-border);
}

.ti-nav-tab:hover {
    color: var(--ti-text-dark);
    border-color: var(--ti-text-dark);
    text-decoration: none;
}

.ti-nav-tab.active {
    background: var(--ti-text-dark);
    color: white;
    border-color: var(--ti-text-dark);
}

/* === FILTER BAR === */
.ti-filter-bar {
    max-width: 1400px;
    margin: 0 auto 24px;
    padding: 0 40px;
}

.ti-filter-form {
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    box-shadow: var(--ti-shadow);
    border: 1px solid var(--ti-border);
}

.ti-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.ti-filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ti-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ti-select {
    padding: 12px 40px 12px 16px;
    font-family: var(--ti-font-body);
    font-size: 14px;
    border: 1px solid var(--ti-border);
    border-radius: var(--ti-radius-sm);
    background: var(--ti-bg-white) 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='%23333333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
    appearance: none;
    cursor: pointer;
    transition: var(--ti-transition-fast);
}

.ti-select:hover, .ti-select:focus {
    border-color: var(--ti-primary);
    outline: none;
}

/* === CARD === */
.ti-card {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 40px;
}

.ti-card > * {
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
    box-shadow: var(--ti-shadow);
    overflow: hidden;
    border: 1px solid var(--ti-border);
}

/* === TABLE === */
.ti-table-responsive {
    overflow-x: auto;
}

.ti-table {
    width: 100%;
    border-collapse: collapse;
}

.ti-table thead {
    background: var(--ti-bg-light);
}

.ti-table th {
    padding: 18px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--ti-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--ti-border);
}

.ti-table td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--ti-border);
    vertical-align: middle;
}

.ti-table-row {
    transition: var(--ti-transition-fast);
}

.ti-table-row:hover {
    background: var(--ti-bg-light);
}

.ti-table-row:last-child td {
    border-bottom: none;
}

/* === TABLE CELLS === */
.ti-td-order {
    min-width: 180px;
}

.ti-order-link {
    color: var(--ti-text-dark);
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.ti-order-link:hover {
    color: var(--ti-primary-dark);
    text-decoration: none;
}

.ti-order-date {
    display: block;
    font-size: 12px;
    color: var(--ti-text-light);
    margin-top: 4px;
}

.ti-supplier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--ti-bg-light);
    border-radius: var(--ti-radius-full);
    font-size: 13px;
    color: var(--ti-text);
}

.ti-delivery-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.ti-delivery-date small {
    color: var(--ti-text-light);
}

.ti-date-urgent {
    color: var(--ti-danger);
    font-weight: 600;
}

.ti-date-soon {
    color: var(--ti-warning);
    font-weight: 500;
}

.ti-td-prices {
    min-width: 150px;
}

.ti-price-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.ti-price-info small {
    color: var(--ti-text-light);
}

.ti-price-margin {
    color: var(--ti-success);
    font-weight: 600;
}

/* === STATUS BADGES === */
.ti-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--ti-radius-full);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ti-status-secondary { background: var(--ti-bg-light); color: var(--ti-text-muted); }
.ti-status-info { background: var(--ti-info-light); color: var(--ti-blue); }
.ti-status-warning { background: var(--ti-warning-light); color: #c68400; }
.ti-status-primary { background: rgba(247, 196, 51, 0.2); color: var(--ti-primary-dark); }
.ti-status-success { background: var(--ti-success-light); color: #3d8b3d; }
.ti-status-danger { background: var(--ti-danger-light); color: var(--ti-danger); }
.ti-status-dark { background: var(--ti-text-dark); color: white; }

/* === ACTION BUTTONS === */
.ti-td-actions {
    width: 150px;
}

.ti-action-buttons {
    display: flex;
    gap: 8px;
}

/* === PAGINATION === */
.ti-pagination {
    padding: 24px;
    border-top: 1px solid var(--ti-border);
}

.ti-pagination ul {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ti-pagination li a,
.ti-pagination li span {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--ti-bg-white);
    border: 1px solid var(--ti-border);
    border-radius: var(--ti-radius-sm);
    font-size: 14px;
    color: var(--ti-text);
    text-decoration: none;
    transition: var(--ti-transition-fast);
}

.ti-pagination li a:hover {
    background: var(--ti-primary);
    border-color: var(--ti-primary);
    color: var(--ti-text-dark);
    text-decoration: none;
}

.ti-pagination li .current {
    background: var(--ti-text-dark);
    border-color: var(--ti-text-dark);
    color: white;
}

/* === EMPTY STATE === */
.ti-empty-state {
    padding: 100px 40px;
    text-align: center;
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
}

.ti-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: var(--ti-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--ti-text-light);
}

.ti-empty-state h3 {
    font-family: var(--ti-font-heading);
    font-size: 1.5rem;
    color: var(--ti-text-dark);
    margin: 0 0 12px;
}

.ti-empty-state p {
    color: var(--ti-text-muted);
    margin: 0 0 32px;
    font-size: 16px;
}

/* === DECORATIVE ELEMENTS === */
.ti-decoration {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
}

.ti-decoration-star {
    width: 60px;
    height: 60px;
}

.ti-decoration-laptop {
    width: 80px;
    height: 80px;
}

/* ============================================
   FORM CONTAINERS - ORDER FORM, EDIT, SUPPLIER
   ============================================ */

.ti-order-form-container,
.ti-order-edit-container,
.ti-supplier-list-container,
.ti-supplier-form-container {
    margin: 0;
    max-width: 100%;
    padding: 0;
    background: var(--ti-bg);
    min-height: 100vh;
}

/* === FORM PAGE HEADER === */
.ti-page-header {
    background: var(--ti-primary);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.ti-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ti-page-header-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.ti-page-header h1 {
    font-family: var(--ti-font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--ti-text-dark);
    margin: 0 0 8px;
}

.ti-page-header p {
    color: var(--ti-text);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

/* === FORM CONTENT AREA === */
.ti-form-content {
    max-width: 1000px;
    margin: -30px auto 40px;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* === FORM CARDS === */
.ti-form-card {
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
    box-shadow: var(--ti-shadow);
    border: 1px solid var(--ti-border);
    margin-bottom: 24px;
    overflow: hidden;
}

.ti-form-card-header {
    background: var(--ti-bg-light);
    padding: 20px 28px;
    border-bottom: 1px solid var(--ti-border);
}

.ti-form-card-header h5 {
    font-family: var(--ti-font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--ti-text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ti-form-card-header h5 i {
    color: var(--ti-primary);
}

.ti-form-card-body {
    padding: 28px;
}

/* === FORM ELEMENTS === */
.ti-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ti-form-row:last-child {
    margin-bottom: 0;
}

.ti-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ti-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ti-text);
}

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

.ti-form-control {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--ti-font-body);
    font-size: 15px;
    border: 1px solid var(--ti-border);
    border-radius: var(--ti-radius-sm);
    background: var(--ti-bg-white);
    transition: var(--ti-transition-fast);
}

.ti-form-control:focus {
    border-color: var(--ti-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 196, 51, 0.2);
}

.ti-form-control[readonly],
.ti-form-control:disabled {
    background-color: var(--ti-bg-light);
    color: var(--ti-text-muted);
}

.ti-form-control.ti-readonly {
    background-color: var(--ti-bg-light);
    color: var(--ti-text-muted);
    cursor: not-allowed;
}

.ti-form-hint {
    font-size: 12px;
    color: var(--ti-text-light);
}

/* === FORM ACTIONS === */
.ti-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
}

/* === PRODUCTS TABLE IN FORM === */
.ti-products-table {
    width: 100%;
    border-collapse: collapse;
}

.ti-products-table thead {
    background: var(--ti-bg-light);
}

.ti-products-table th {
    padding: 14px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--ti-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--ti-border);
}

.ti-products-table td {
    padding: 12px;
    border-bottom: 1px solid var(--ti-border);
    vertical-align: middle;
}

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

.ti-products-table .ti-form-control {
    padding: 10px 14px;
    font-size: 14px;
}

/* === SUPPLIER CARDS === */
.ti-supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px;
}

.ti-supplier-card {
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
    padding: 28px;
    border: 1px solid var(--ti-border);
    transition: var(--ti-transition);
    position: relative;
    overflow: hidden;
}

.ti-supplier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ti-primary);
    transform: scaleX(0);
    transition: var(--ti-transition);
}

.ti-supplier-card:hover {
    box-shadow: var(--ti-shadow-lg);
    transform: translateY(-4px);
}

.ti-supplier-card:hover::before {
    transform: scaleX(1);
}

.ti-supplier-card h4 {
    font-family: var(--ti-font-heading);
    font-size: 1.25rem;
    color: var(--ti-text-dark);
    margin: 0 0 16px;
}

.ti-supplier-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ti-supplier-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--ti-text-muted);
}

.ti-supplier-info-item i {
    width: 20px;
    color: var(--ti-text-light);
}

.ti-supplier-margin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--ti-success-light);
    border-radius: var(--ti-radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--ti-success);
}

.ti-supplier-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ti-border);
}

/* ============================================
   LEGACY BOOTSTRAP OVERRIDES
   ============================================ */

.card {
    background: var(--ti-bg-white);
    border: 1px solid var(--ti-border);
    border-radius: var(--ti-radius);
    box-shadow: var(--ti-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--ti-shadow-lg);
    transition: var(--ti-transition);
}

.card-header {
    background: var(--ti-bg-light);
    border-bottom: 1px solid var(--ti-border);
    padding: 20px 28px;
}

.card-header h3,
.card-header h5 {
    font-family: var(--ti-font-heading);
    color: var(--ti-text-dark);
    font-weight: 400;
    margin: 0;
    font-size: 1.25rem;
}

.card-header.bg-primary {
    background: var(--ti-primary) !important;
    border-bottom: none;
}

.card-header.bg-primary h3,
.card-header.bg-primary h5 {
    color: var(--ti-text-dark);
}

.card-header.bg-light {
    background: var(--ti-bg-light);
}

.card-body {
    padding: 28px;
}

/* === FORM CONTROLS (Bootstrap Override) === */
.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ti-text);
    font-size: 13px;
}

.form-control,
.form-select {
    border: 1px solid var(--ti-border);
    border-radius: var(--ti-radius-sm);
    padding: 12px 16px;
    font-family: var(--ti-font-body);
    font-size: 15px;
    transition: var(--ti-transition-fast);
    background: var(--ti-bg-white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ti-primary);
    box-shadow: 0 0 0 3px rgba(247, 196, 51, 0.2);
    outline: none;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background-color: var(--ti-bg-light);
    color: var(--ti-text-muted);
}

.form-control.bg-light {
    background-color: var(--ti-bg-light);
}

textarea.form-control {
    min-height: 120px;
}

.form-text {
    font-size: 12px;
    color: var(--ti-text-light);
    margin-top: 6px;
}

/* === BUTTONS (Bootstrap Override) === */
.btn {
    border-radius: var(--ti-radius-full);
    font-family: var(--ti-font-body);
    font-weight: 500;
    padding: 12px 24px;
    font-size: 15px;
    transition: var(--ti-transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--ti-text-dark);
    color: white;
    border-color: var(--ti-text-dark);
}

.btn-primary:hover {
    background: var(--ti-primary);
    color: var(--ti-text-dark);
    border-color: var(--ti-primary);
    transform: translateY(-2px);
    box-shadow: var(--ti-shadow-lg);
}

.btn-success {
    background: var(--ti-success);
    color: white;
    border-color: var(--ti-success);
}

.btn-success:hover {
    background: #4a9c4a;
    border-color: #4a9c4a;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--ti-danger);
    color: white;
    border-color: var(--ti-danger);
}

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

.btn-secondary {
    background: var(--ti-bg-light);
    color: var(--ti-text);
    border: 2px solid var(--ti-border);
}

.btn-secondary:hover {
    background: var(--ti-bg-white);
    border-color: var(--ti-text-dark);
    color: var(--ti-text-dark);
}

.btn-outline-danger {
    border: 2px solid var(--ti-danger);
    color: var(--ti-danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--ti-danger);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--ti-text-dark);
    color: var(--ti-text-dark);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--ti-text-dark);
    color: white;
}

.btn-outline-success {
    border: 2px solid var(--ti-success);
    color: var(--ti-success);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--ti-success);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid var(--ti-border);
    color: var(--ti-text-muted);
    background: transparent;
}

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

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === TABLE STYLING (Bootstrap Override) === */
.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    font-weight: 600;
    border-bottom: 1px solid var(--ti-border);
    white-space: nowrap;
    color: var(--ti-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 14px;
    background: var(--ti-bg-light);
}

.table tbody td {
    padding: 16px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--ti-border);
}

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

.table tbody tr:hover {
    background-color: var(--ti-bg-light);
}

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

.table-light {
    background-color: var(--ti-bg-light);
}

/* === BADGE STYLING === */
.badge {
    padding: 8px 14px;
    font-weight: 500;
    font-size: 12px;
    border-radius: var(--ti-radius-full);
    text-transform: none;
    letter-spacing: 0;
}

.badge.bg-secondary { background-color: var(--ti-text-muted) !important; }
.badge.bg-info { background-color: var(--ti-blue) !important; }
.badge.bg-warning { background-color: var(--ti-warning) !important; color: white !important; }
.badge.bg-success { background-color: var(--ti-success) !important; }
.badge.bg-primary { background-color: var(--ti-primary) !important; color: var(--ti-text-dark) !important; }
.badge.bg-danger { background-color: var(--ti-danger) !important; }
.badge.bg-dark { background-color: var(--ti-text-dark) !important; }

/* === ALERT STYLING === */
.alert {
    border-radius: var(--ti-radius-sm);
    border: none;
    padding: 18px 24px;
    animation: slideIn 0.3s ease;
    font-size: 15px;
}

.alert-success {
    background-color: var(--ti-success-light);
    color: #3d8b3d;
    border-left: 4px solid var(--ti-success);
}

.alert-danger {
    background-color: var(--ti-danger-light);
    color: var(--ti-danger);
    border-left: 4px solid var(--ti-danger);
}

.alert-warning {
    background-color: var(--ti-warning-light);
    color: #c68400;
    border-left: 4px solid var(--ti-warning);
}

.alert-info {
    background-color: var(--ti-info-light);
    color: var(--ti-blue);
    border-left: 4px solid var(--ti-blue);
}

/* === MODAL STYLING === */
.modal-content {
    border-radius: var(--ti-radius);
    border: none;
    box-shadow: var(--ti-shadow-hover);
}

.modal-header {
    border-bottom: 1px solid var(--ti-border);
    padding: 24px 28px;
    background: var(--ti-bg-light);
}

.modal-title {
    font-family: var(--ti-font-heading);
    font-weight: 400;
    color: var(--ti-text-dark);
    font-size: 1.25rem;
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    border-top: 1px solid var(--ti-border);
    padding: 20px 28px;
    background: var(--ti-bg-light);
}

/* === INPUT GROUP === */
.input-group {
    border-radius: var(--ti-radius-sm);
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--ti-radius-sm) 0 0 var(--ti-radius-sm);
}

.input-group .btn:last-child {
    border-radius: 0 var(--ti-radius-sm) var(--ti-radius-sm) 0;
}

/* === SPINNER === */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* === LOADING STATE === */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

/* === ANIMATIONS === */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* === PAGINATION (Bootstrap Override) === */
.pagination {
    margin-top: 24px;
}

.pagination .page-link {
    border-radius: var(--ti-radius-sm);
    margin: 0 4px;
    border: 1px solid var(--ti-border);
    color: var(--ti-text);
    padding: 10px 16px;
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: var(--ti-primary);
    border-color: var(--ti-primary);
    color: var(--ti-text-dark);
}

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

/* === LIST GROUP === */
.list-group-item {
    border: 1px solid var(--ti-border);
    border-radius: var(--ti-radius-sm) !important;
    margin-bottom: 10px;
    padding: 18px;
    transition: var(--ti-transition-fast);
}

.list-group-item:hover {
    background-color: var(--ti-bg-light);
}

/* === MESSAGE CONTAINERS === */
#message-container,
#form-message {
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 40px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .ti-dashboard-header,
    .ti-page-header {
        padding: 32px 20px;
    }

    .ti-header-content {
        flex-direction: column;
        text-align: center;
    }

    .ti-header-title h1,
    .ti-page-header h1 {
        font-size: 1.75rem;
    }

    .ti-stats-row {
        margin-top: -24px;
        padding: 0 20px;
        grid-template-columns: 1fr;
    }

    .ti-nav-tabs,
    .ti-filter-bar,
    .ti-card,
    .ti-form-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .ti-filter-form {
        flex-direction: column;
    }

    .ti-filter-group {
        width: 100%;
    }

    .ti-table th,
    .ti-table td {
        padding: 14px 10px;
    }

    .ti-td-prices {
        display: none;
    }

    .ti-form-row {
        grid-template-columns: 1fr;
    }

    .ti-form-actions {
        flex-direction: column;
    }

    .ti-supplier-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .card-body {
        padding: 20px;
    }

    .card-header {
        padding: 16px 20px;
    }

    .card-header h3 {
        font-size: 1.1rem;
    }
}

/* === PRINT === */
@media print {
    body {
        background-color: white !important;
    }

    .btn, .pagination, .card-header .btn, .ti-nav-tabs, .ti-filter-bar, .ti-dashboard-header, .ti-page-header {
        display: none !important;
    }

    .card, .ti-card > *, .ti-form-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   CUSTOM MODAL (TI Modal)
   ============================================ */

.ti-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--ti-transition);
}

.ti-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ti-modal {
    background: var(--ti-bg-white);
    border-radius: var(--ti-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--ti-shadow-hover);
    transform: scale(0.9) translateY(20px);
    transition: var(--ti-transition);
}

.ti-modal-overlay.active .ti-modal {
    transform: scale(1) translateY(0);
}

.ti-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: var(--ti-bg-light);
    border-bottom: 1px solid var(--ti-border);
}

.ti-modal-header h3 {
    font-family: var(--ti-font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--ti-text-dark);
    margin: 0;
}

.ti-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--ti-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--ti-radius-sm);
    transition: var(--ti-transition-fast);
}

.ti-modal-close:hover {
    background: var(--ti-bg);
    color: var(--ti-text-dark);
}

.ti-modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: 60vh;
}

.ti-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    background: var(--ti-bg-light);
    border-top: 1px solid var(--ti-border);
}

/* ============================================
   CUSTOM BADGES (TI Badge)
   ============================================ */

.ti-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--ti-radius-full);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.ti-badge-primary {
    background: rgba(247, 196, 51, 0.2);
    color: var(--ti-primary-dark);
}

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

.ti-badge-success {
    background: var(--ti-success-light);
    color: #3d8b3d;
}

.ti-badge-warning {
    background: var(--ti-warning-light);
    color: #c68400;
}

.ti-badge-danger {
    background: var(--ti-danger-light);
    color: var(--ti-danger);
}

.ti-badge-info {
    background: var(--ti-info-light);
    color: var(--ti-blue);
}

/* ============================================
   CUSTOM ALERTS (TI Alert)
   ============================================ */

.ti-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--ti-radius-sm);
    font-size: 14px;
}

.ti-alert-success {
    background: var(--ti-success-light);
    color: #3d8b3d;
    border-left: 4px solid var(--ti-success);
}

.ti-alert-danger {
    background: var(--ti-danger-light);
    color: var(--ti-danger);
    border-left: 4px solid var(--ti-danger);
}

.ti-alert-warning {
    background: var(--ti-warning-light);
    color: #c68400;
    border-left: 4px solid var(--ti-warning);
}

.ti-alert-info {
    background: var(--ti-info-light);
    color: var(--ti-blue);
    border-left: 4px solid var(--ti-blue);
}

/* ============================================
   SUPPLIER CARDS - UPDATED
   ============================================ */

.ti-supplier-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.ti-supplier-card-header h4 {
    font-family: var(--ti-font-heading);
    font-size: 1.25rem;
    color: var(--ti-text-dark);
    margin: 0;
}

.ti-supplier-card-body {
    margin-bottom: 16px;
}

.ti-supplier-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ti-text-muted);
    margin-bottom: 10px;
}

.ti-supplier-info:last-child {
    margin-bottom: 0;
}

.ti-supplier-info i {
    width: 18px;
    color: var(--ti-text-light);
    margin-top: 2px;
}

.ti-supplier-info a {
    color: var(--ti-text);
    text-decoration: none;
}

.ti-supplier-info a:hover {
    color: var(--ti-primary-dark);
}

.ti-supplier-card-footer {
    padding-top: 16px;
    border-top: 1px solid var(--ti-border);
}

/* ============================================
   COMMENT THREAD
   ============================================ */

.ti-comment {
    border-left: 3px solid var(--ti-border);
    padding-left: 20px;
    margin-bottom: 20px;
}

.ti-comment:last-child {
    margin-bottom: 0;
}

.ti-comment-supplier {
    border-left-color: var(--ti-blue);
}

.ti-comment-user {
    border-left-color: var(--ti-text-muted);
}

.ti-comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ti-comment-date {
    font-size: 12px;
    color: var(--ti-text-light);
}

.ti-comment-body {
    font-size: 14px;
    color: var(--ti-text);
    line-height: 1.6;
}

.ti-comment-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
}

.ti-comment-file i {
    color: var(--ti-danger);
}

.ti-comment-file a {
    color: var(--ti-text);
    text-decoration: none;
}

.ti-comment-file a:hover {
    color: var(--ti-primary-dark);
}

/* ============================================
   FILE LIST
   ============================================ */

.ti-file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ti-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--ti-bg-light);
    border-radius: var(--ti-radius-sm);
    border: 1px solid var(--ti-border);
}

.ti-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.ti-file-info i {
    color: var(--ti-primary);
}

.ti-file-info a {
    color: var(--ti-text);
    text-decoration: none;
}

.ti-file-info a:hover {
    color: var(--ti-primary-dark);
}

.ti-file-info small {
    color: var(--ti-text-light);
}

/* ============================================
   PRODUCT MARGIN DISPLAY
   ============================================ */

.product-margin {
    font-size: 13px;
    font-weight: 600;
    color: var(--ti-success);
}

.ti-table-footer {
    background: var(--ti-bg-light);
}

.ti-table-footer td {
    padding: 16px 12px;
    border-top: 2px solid var(--ti-border);
}

/* ============================================
   HEADER BADGE (for order status)
   ============================================ */

.ti-header-badge {
    position: absolute;
    top: 48px;
    right: 40px;
    z-index: 2;
}

/* ============================================
   AUTOCOMPLETE / SEARCH DROPDOWN
   ============================================ */

.ti-autocomplete-wrapper {
    position: relative;
}

.ti-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ti-bg-white);
    border: 1px solid var(--ti-border);
    border-top: none;
    border-radius: 0 0 var(--ti-radius-sm) var(--ti-radius-sm);
    box-shadow: var(--ti-shadow-lg);
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.ti-autocomplete-dropdown.active {
    display: block;
}

.ti-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--ti-border);
    transition: var(--ti-transition-fast);
}

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

.ti-autocomplete-item:hover,
.ti-autocomplete-item.selected {
    background: var(--ti-bg-light);
}

.ti-autocomplete-item-title {
    font-weight: 600;
    color: var(--ti-text-dark);
    font-size: 14px;
    margin-bottom: 4px;
}

.ti-autocomplete-item-subtitle {
    font-size: 12px;
    color: var(--ti-text-muted);
}

.ti-autocomplete-item-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.ti-autocomplete-item-meta span {
    font-size: 11px;
    color: var(--ti-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ti-autocomplete-loading {
    padding: 20px;
    text-align: center;
    color: var(--ti-text-muted);
}

.ti-autocomplete-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ti-autocomplete-empty {
    padding: 20px;
    text-align: center;
    color: var(--ti-text-muted);
    font-size: 14px;
}

.ti-autocomplete-header {
    padding: 10px 16px;
    background: var(--ti-bg-light);
    font-size: 11px;
    font-weight: 600;
    color: var(--ti-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--ti-border);
}

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

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

.fw-bold {
    font-weight: 600 !important;
}

.small {
    font-size: 0.875rem;
}

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

.bg-primary {
    background-color: var(--ti-primary) !important;
}
