:root {
    --bg: #0a0a0a;
    --card: #121212;
    --card-hover: #1a1a1a;
    --border: #262626;
    --border-focus: #fbbf24;
    --primary: #fbbf24;
    --success: #22c55e;
    --danger: #ef4444;
    --text: #ffffff;
    --text-muted: #a3a3a3;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* NAVBAR */
.navbar {
    background: rgba(10, 10, 10, 0.85);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
}

.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* TABS */
.tabs-wrapper {
    background: var(--bg);
    padding: 20px 16px 0;
    max-width: 600px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 6px;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-align: center;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
    background: var(--card-hover);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* CONTAINER */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    font-weight: 500;
}

/* CARD */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.form-group { margin-bottom: 20px; }

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

/* Inputs */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    right: 16px;
    color: #666;
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s;
}

input, textarea {
    width: 100%;
    padding: 16px 48px 16px 16px;
    background: #080808;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 16px;
}

input:focus, textarea:focus { 
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15);
}

input:focus + i, textarea:focus + i { color: var(--primary); }
input::placeholder, textarea::placeholder { color: #555; font-weight: 400; }

/* BUTTONS */
.btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mt-2 { margin-top: 12px; }

.btn {
    flex: 1;
    padding: 18px 20px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

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

/* زر الجولد الأساسي (مطابق للصورة) */
.btn-gold {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: #111;
    border: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* زر الإيقاف الشفاف بإطار جولد */
.btn-gold-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
}
.btn-gold-outline:hover {
    background: rgba(251, 191, 36, 0.1);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

/* LIVE LIST */
.live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.live-badge {
    font-size: 0.8rem;
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.list-item {
    background: #080808;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: border-color 0.3s;
}
.list-item:hover { border-color: #333; }
.list-item:last-child { margin-bottom: 0; }

.list-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-left {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-damar {
    background: rgba(251, 191, 36, 0.15);
    color: var(--primary);
}

.badge-rm {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-both {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    background: #080808;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 24px;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    width: max-content;
    max-width: 90%;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .navbar { padding: 12px 16px; }
    .container { padding: 16px 12px; }
    .card { padding: 20px; }
    .btn-row { flex-direction: column; }
    .btn { width: 100%; }
}