/* DealHunter — Production Gear & Gigs Dashboard */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #111;
    border-bottom: 1px solid #222;
    z-index: 100;
}

.topbar-inner {
    max-width: 960px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4fc3f7, #66bb6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
}

.tabs {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.tab {
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.tab:hover { color: #aaa; }

.tab.active {
    color: #4fc3f7;
    border-bottom-color: #4fc3f7;
}

/* ── Status Badge ───────────────────────────────────── */
.badge {
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-live {
    background: rgba(76, 175, 80, 0.2);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.3);
    animation: pulse-glow 2s infinite;
}

.badge-paused {
    background: rgba(255, 152, 0, 0.2);
    color: #ffa726;
    border: 1px solid rgba(255, 152, 0, 0.3);
    animation: none;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 0 12px rgba(76, 175, 80, 0.5); }
}

/* ── Container ──────────────────────────────────────── */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 72px 16px 24px;
}

/* ── Tab Content ────────────────────────────────────── */
.tab-content {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Stats Grid ─────────────────────────────────────── */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
}

.stat-card .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4fc3f7;
    line-height: 1;
}

.stat-card .label {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Controls ───────────────────────────────────────── */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 8px 16px;
}

.switch-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #333;
    border-radius: 24px;
    transition: 0.3s;
}

.switch .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #888;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background: #2e7d32;
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
    background: #66bb6a;
}

.switch-sm {
    width: 36px;
    height: 20px;
}

.switch-sm .slider::before {
    height: 14px;
    width: 14px;
}

.switch-sm input:checked + .slider::before {
    transform: translateX(16px);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
    background: #4fc3f7;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:hover { background: #81d4fa; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { background: #333; color: #666; cursor: not-allowed; transform: none; }

.btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #333;
    color: #ccc;
}

.btn-outline:hover { background: #1a1a1a; border-color: #555; }

.btn-muted {
    color: #555;
    border-color: #282828;
}

.btn-muted:hover { color: #999; background: #1a1a1a; }

.btn-danger {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.btn-danger:hover { background: rgba(239, 83, 80, 0.25); }

/* ── Filters ────────────────────────────────────────── */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters select {
    background: #141414;
    color: #e0e0e0;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.filters select:focus {
    outline: none;
    border-color: #4fc3f7;
}

/* ── Gear Listing Cards ─────────────────────────────── */
.listings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.listing {
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 12px;
    transition: border-color 0.2s;
}

.listing:hover { border-color: #333; }

.listing-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    object-fit: cover;
    border-radius: 8px;
    background: #1a1a1a;
}

.listing-info {
    flex: 1;
    min-width: 0;
}

.listing-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-title a {
    color: #e0e0e0;
    text-decoration: none;
}

.listing-title a:hover { color: #4fc3f7; }

.listing-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #66bb6a;
    margin-bottom: 3px;
}

.listing-meta {
    font-size: 0.75rem;
    color: #555;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.source-badge {
    background: #1e1e1e;
    color: #888;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.category-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.cat-lenses { background: rgba(79, 195, 247, 0.15); color: #4fc3f7; }
.cat-camera_support { background: rgba(255, 183, 77, 0.15); color: #ffb74d; }
.cat-lighting_grip { background: rgba(255, 241, 118, 0.15); color: #fff176; }
.cat-power_accessories { background: rgba(239, 83, 80, 0.15); color: #ef5350; }
.cat-audio { background: rgba(171, 71, 188, 0.15); color: #ab47bc; }
.cat-monitors_wireless { background: rgba(102, 187, 106, 0.15); color: #66bb6a; }

/* ── Gig Sub-tabs ───────────────────────────────────── */
.gig-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.gig-subtab {
    background: #1a1a1a;
    border: 1px solid #282828;
    color: #888;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.gig-subtab:hover { background: #222; color: #bbb; }

.gig-subtab.active {
    background: rgba(79, 195, 247, 0.12);
    border-color: rgba(79, 195, 247, 0.3);
    color: #4fc3f7;
}

/* ── Gig Cards ──────────────────────────────────────── */
.gig-card {
    background: #141414;
    border: 1px solid #222;
    border-left: 3px solid #78909c;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.gig-card:hover {
    border-color: #333;
    background: #181818;
}

.gig-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.gig-type-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gig-time {
    font-size: 0.72rem;
    color: #555;
    margin-left: auto;
}

.gig-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.gig-title a {
    color: #e0e0e0;
    text-decoration: none;
}

.gig-title a:hover { color: #4fc3f7; }

.gig-company {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.gig-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.gig-rate {
    color: #66bb6a;
    font-weight: 600;
}

.gig-location {
    color: #999;
}

.gig-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #1e1e1e;
    color: #aaa;
}

.gig-role {
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 6px;
}

.gig-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gig-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Role Alert Toggles ────────────────────────────── */
.role-alerts {
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.role-alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.role-alerts-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-toggle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a1a1a;
    border: 1px solid #282828;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.role-chip.active {
    background: rgba(79, 195, 247, 0.1);
    border-color: rgba(79, 195, 247, 0.3);
    color: #4fc3f7;
}

.role-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    transition: background 0.2s;
}

.role-chip.active .dot {
    background: #4fc3f7;
}

/* ── Settings / Contacts ────────────────────────────── */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.section-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
}

.add-contact-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input {
    background: #141414;
    color: #e0e0e0;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    flex: 1;
    min-width: 140px;
    transition: border-color 0.2s;
}

.input:focus {
    outline: none;
    border-color: #4fc3f7;
}

.input::placeholder {
    color: #555;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-card {
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.contact-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-phone,
.contact-telegram {
    font-size: 0.8rem;
    color: #888;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Empty state ────────────────────────────────────── */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: #444;
    font-size: 0.9rem;
}

.empty .icon { font-size: 2rem; margin-bottom: 8px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
    .topbar-inner { gap: 8px; }
    .logo { font-size: 1.1rem; }
    .tab { font-size: 0.75rem; padding: 6px 8px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat-card .number { font-size: 1.4rem; }
    .listing-thumb { width: 56px; height: 56px; min-width: 56px; }
    .filters select { flex: 1; min-width: 0; }
    .add-contact-form { flex-direction: column; }
    .add-contact-form .input { min-width: 100%; }
    .contact-card { flex-direction: column; align-items: flex-start; }
    .contact-actions { width: 100%; justify-content: flex-end; }
    .gig-details { gap: 8px; }
}

@media (max-width: 400px) {
    .tabs { gap: 0; }
    .tab { font-size: 0.7rem; padding: 6px 6px; }
    .badge { font-size: 0.6rem; padding: 2px 6px; }
}
