/* ============================================================
   MTS MINDS - STYLE.CSS
   Dizajn: Blu profesionale + Portokalli theks
   ============================================================ */

:root {
    --navy: #0f2557;
    --navy-light: #1e3a8a;
    --blue: #2563eb;
    --orange: #ea580c;
    --orange-light: #f97316;
    --green: #16a34a;
    --red: #dc2626;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --shadow: 0 4px 20px rgba(15,37,87,0.08);
    --shadow-lg: 0 10px 40px rgba(15,37,87,0.15);
    --radius: 12px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background: var(--gray-100);
    line-height: 1.5;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ===== BUTTONS ===== */
.btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:10px 18px; border:none; border-radius:10px;
    font-size:14px; font-weight:600; cursor:pointer;
    text-decoration:none; transition:all .2s; white-space:nowrap;
}
.btn-sm { padding:7px 14px; font-size:13px; }
.btn-lg { padding:14px 28px; font-size:16px; }
.btn-primary { background:var(--orange); color:white; }
.btn-primary:hover { background:var(--orange-light); transform:translateY(-1px); }
.btn-outline { background:transparent; color:white; border:2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background:rgba(255,255,255,0.15); }
.btn-white { background:white; color:var(--navy); }
.btn-white:hover { transform:translateY(-1px); box-shadow:var(--shadow); }
.btn-ghost { background:transparent; color:inherit; }
.btn-ghost:hover { background:rgba(0,0,0,0.05); }
.btn-danger { background:var(--red); color:white; }
.btn-success { background:var(--green); color:white; }

/* ===== HEADER ===== */
.header {
    background:white; box-shadow:var(--shadow);
    position:sticky; top:0; z-index:100;
}
.header-inner { display:flex; align-items:center; justify-content:space-between; height:68px; }
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--navy); }
.logo-icon { font-size:32px; }
.logo-text strong { display:block; font-size:19px; }
.logo-text small { display:block; font-size:11px; color:var(--gray-400); }
.header-actions { display:flex; align-items:center; gap:12px; }
.auth-guest, .auth-user { display:flex; align-items:center; gap:8px; }
.user-name { font-weight:600; color:var(--navy); font-size:14px; }

/* ===== LANGUAGE ===== */
.lang-selector { position:relative; }
.lang-btn {
    display:flex; align-items:center; gap:6px;
    padding:8px 12px; background:var(--gray-100); border:none;
    border-radius:10px; cursor:pointer; font-size:14px; font-weight:600;
}
.lang-btn:hover { background:var(--gray-200); }
.caret { font-size:10px; color:var(--gray-400); }
.lang-dropdown {
    position:absolute; top:calc(100% + 6px); right:0;
    background:white; border-radius:12px; box-shadow:var(--shadow-lg);
    min-width:170px; padding:6px; display:none; z-index:200;
}
.lang-dropdown.open { display:block; }
.lang-option {
    display:flex; align-items:center; gap:10px;
    padding:10px 12px; border-radius:8px; cursor:pointer; font-size:14px;
}
.lang-option:hover { background:var(--gray-100); }
.lang-option.active { background:var(--navy); color:white; }

/* ===== HERO ===== */
.hero {
    background:linear-gradient(135deg, var(--navy), var(--navy-light));
    color:white; text-align:center; padding:64px 16px;
}
.hero h1 { font-size:40px; font-weight:800; margin-bottom:12px; }
.hero p { font-size:18px; opacity:0.9; margin-bottom:28px; max-width:600px; margin-left:auto; margin-right:auto; }
.hero-buttons { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ===== STATS ===== */
.stats { margin-top:-36px; margin-bottom:32px; position:relative; z-index:10; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat-card {
    background:white; border-radius:var(--radius); padding:24px;
    text-align:center; box-shadow:var(--shadow);
}
.stat-icon { font-size:28px; margin-bottom:8px; }
.stat-num { font-size:32px; font-weight:800; color:var(--navy); }
.stat-label { font-size:13px; color:var(--gray-600); margin-top:4px; }
.stat-online .stat-num { color:var(--green); }

/* ===== TABS ===== */
.main { margin-bottom:48px; }
.tabs { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:16px; }
.tab {
    display:flex; align-items:center; justify-content:center; gap:8px;
    padding:14px 12px; background:white; border:2px solid transparent;
    border-radius:var(--radius); cursor:pointer; font-weight:600; font-size:14px;
    color:var(--gray-600); transition:all .2s;
}
.tab:hover { border-color:var(--gray-200); }
.tab.active { background:var(--navy); color:white; }
.tab-icon { font-size:18px; }

/* ===== FILTER BAR ===== */
.filter-bar {
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    background:white; padding:16px; border-radius:var(--radius);
    margin-bottom:16px; box-shadow:var(--shadow);
}
.filter-select {
    padding:9px 12px; border:2px solid var(--gray-200);
    border-radius:8px; font-size:14px; min-width:150px; cursor:pointer;
}
.filter-select:focus { outline:none; border-color:var(--blue); }
.arrow { font-weight:bold; color:var(--navy); }
.search-box { margin-left:auto; flex:1; min-width:200px; }
.search-box input {
    width:100%; padding:9px 14px; border:2px solid var(--gray-200);
    border-radius:8px; font-size:14px;
}
.search-box input:focus { outline:none; border-color:var(--blue); }

.post-fab { display:none; }

/* ===== OFFERS TABLE ===== */
.offers-wrap { background:white; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.offers-table { width:100%; border-collapse:collapse; }
.offers-table thead { background:var(--navy); color:white; }
.offers-table th {
    padding:14px 12px; text-align:left; font-size:12px;
    font-weight:700; text-transform:uppercase; letter-spacing:0.3px;
}
.offers-table td { padding:14px 12px; border-bottom:1px solid var(--gray-100); font-size:14px; }
.offers-table tbody tr { cursor:pointer; transition:background .15s; }
.offers-table tbody tr:hover { background:var(--gray-50); }
.route-cell { display:flex; align-items:center; gap:6px; font-weight:600; }
.flag { font-size:18px; }
.badge-weight { background:#dbeafe; color:#1e40af; padding:3px 8px; border-radius:6px; font-size:12px; font-weight:600; }
.badge-type { background:#fef3c7; color:#92400e; padding:3px 8px; border-radius:6px; font-size:12px; font-weight:600; }
.badge-price { color:var(--green); font-weight:700; }
.ago { color:var(--gray-400); font-size:12px; }
.view-btn {
    background:var(--blue); color:white; border:none;
    width:34px; height:34px; border-radius:8px; cursor:pointer; font-size:16px;
}
.empty-row { text-align:center; padding:48px 16px; color:var(--gray-400); }
.empty-row h3 { color:var(--gray-600); margin-bottom:8px; }

/* ===== FOOTER ===== */
.footer { background:var(--navy); color:white; padding:40px 0 0; margin-top:auto; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:32px; padding-bottom:32px; }
.footer h4 { margin-bottom:12px; font-size:16px; }
.footer p, .footer a { color:rgba(255,255,255,0.75); font-size:14px; display:block; margin-bottom:6px; text-decoration:none; }
.footer a:hover { color:white; }
.footer-bottom { border-top:1px solid rgba(255,255,255,0.1); padding:20px 0; text-align:center; font-size:13px; color:rgba(255,255,255,0.6); }

/* ===== MODAL ===== */
.modal {
    display:none; position:fixed; inset:0;
    background:rgba(15,37,87,0.6); z-index:1000;
    align-items:flex-start; justify-content:center; padding:20px; overflow-y:auto;
}
.modal.open { display:flex; }
.modal-box {
    background:white; border-radius:16px; width:100%; max-width:640px;
    margin:auto; box-shadow:var(--shadow-lg); animation:modalIn .25s;
}
@keyframes modalIn { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }
.modal-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:20px 24px; border-bottom:1px solid var(--gray-100);
}
.modal-header h3 { color:var(--navy); font-size:20px; }
.modal-close {
    background:var(--gray-100); border:none; width:36px; height:36px;
    border-radius:10px; cursor:pointer; font-size:16px; color:var(--gray-600);
}
.modal-close:hover { background:var(--gray-200); }
.modal-body { padding:24px; }

/* ===== FORM ===== */
.form-section-title {
    color:var(--navy); font-size:15px; font-weight:700;
    margin:20px 0 10px; padding-bottom:6px; border-bottom:2px solid var(--gray-100);
}
.form-section-title:first-child { margin-top:0; }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.form-group { display:flex; flex-direction:column; }
.form-group.full { grid-column:1/-1; }
.form-group label { font-size:13px; font-weight:600; margin-bottom:5px; color:var(--gray-600); }
.form-group input, .form-group select, .form-group textarea {
    padding:11px 12px; border:2px solid var(--gray-200);
    border-radius:9px; font-size:14px; font-family:inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline:none; border-color:var(--blue);
}
.captcha-box {
    background:#eff6ff; border:2px solid #bfdbfe; border-radius:10px;
    padding:14px; margin-top:16px; display:flex; align-items:center; gap:12px;
}
.captcha-box label { font-weight:700; color:var(--navy); font-size:15px; }
.captcha-box input { width:100px; }
.form-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:24px; padding-top:16px; border-top:1px solid var(--gray-100); }

/* ===== OFFER DETAILS ===== */
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.detail-item { background:var(--gray-50); padding:14px; border-radius:10px; }
.detail-item.full { grid-column:1/-1; }
.detail-label { font-size:12px; color:var(--gray-400); margin-bottom:4px; }
.detail-value { font-size:15px; font-weight:600; color:var(--gray-800); }
.contact-locked {
    background:#fff7ed; border:2px solid #fed7aa; border-radius:10px;
    padding:16px; text-align:center; grid-column:1/-1;
}
.contact-locked a { color:var(--orange); font-weight:700; }

/* ===== MY OFFERS ===== */
.my-offer {
    display:flex; align-items:center; justify-content:space-between;
    gap:12px; flex-wrap:wrap; padding:14px; border-radius:10px;
    background:var(--gray-50); border-left:4px solid var(--green); margin-bottom:10px;
}
.my-offer.expired { border-left-color:var(--red); background:#fef2f2; }
.my-offer-info strong { display:block; margin-bottom:4px; }
.my-offer-meta { font-size:12px; color:var(--gray-400); }
.my-offer-actions { display:flex; gap:8px; }

/* ===== TOAST ===== */
.toast {
    position:fixed; top:20px; right:20px; z-index:2000;
    padding:14px 20px; border-radius:10px; color:white; font-weight:600;
    box-shadow:var(--shadow-lg); display:none; max-width:360px;
}
.toast.show { display:block; animation:toastIn .3s; }
.toast.success { background:var(--green); }
.toast.error { background:var(--red); }
.toast.info { background:var(--blue); }
@keyframes toastIn { from{opacity:0;transform:translateX(40px);} to{opacity:1;transform:translateX(0);} }

/* ===== SPINNER ===== */
.spinner {
    width:36px; height:36px; border:4px solid var(--gray-200);
    border-top-color:var(--blue); border-radius:50%;
    animation:spin .8s linear infinite; margin:20px auto;
}
@keyframes spin { to{transform:rotate(360deg);} }
.loading-center { text-align:center; padding:40px; color:var(--gray-400); }

/* ============================================================
   MOBILE (< 768px)
   ============================================================ */
@media (max-width: 768px) {
    .hero h1 { font-size:28px; }
    .hero p { font-size:15px; }
    .stats-grid { grid-template-columns:repeat(2,1fr); }
    .tabs { grid-template-columns:repeat(2,1fr); }
    .logo-text small { display:none; }
    .header-actions { gap:6px; }
    .auth-guest .btn, .auth-user .btn { padding:8px 10px; font-size:13px; }
    .user-name { display:none; }

    /* Filter stacks */
    .filter-bar { flex-direction:column; align-items:stretch; }
    .filter-select { min-width:auto; width:100%; }
    .arrow { display:none; }
    .search-box { margin-left:0; }

    /* Post button becomes prominent */
    .post-fab { display:flex; width:100%; justify-content:center; margin-bottom:16px; font-size:16px; padding:14px; }

    /* Table → cards */
    .offers-table thead { display:none; }
    .offers-table, .offers-table tbody, .offers-table tr, .offers-table td { display:block; width:100%; }
    .offers-table tr {
        background:white; border-radius:12px; margin-bottom:12px;
        padding:14px; box-shadow:var(--shadow); border:1px solid var(--gray-100);
    }
    .offers-table td { border:none; padding:6px 0; display:flex; justify-content:space-between; }
    .offers-table td::before {
        content:attr(data-label); font-weight:700; color:var(--gray-400);
        font-size:12px; text-transform:uppercase;
    }
    .offers-table td.route-td { flex-direction:column; align-items:flex-start; gap:4px; }
    .offers-table td.route-td::before { display:none; }

    /* Modal full-width */
    .modal { padding:0; }
    .modal-box { border-radius:16px 16px 0 0; margin-top:auto; max-width:100%; }
    .form-grid, .detail-grid { grid-template-columns:1fr; }

    .footer-grid { grid-template-columns:1fr; gap:20px; text-align:center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns:1fr 1fr; }
    .hero { padding:40px 16px; }
    .hero-buttons { flex-direction:column; }
    .hero-buttons .btn { width:100%; justify-content:center; }
}