/* ===== Radar Salla — Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #e74c3c;
  --primary-dark: #c0392b;
  --primary-light: #fce4e3;
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e0e0e0;
  --green: #00b884;
  --orange: #f59e0b;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

body { font-family: 'Tajawal', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }

.app-container { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--card-bg); border-left: 1px solid var(--border); padding: 20px; position: fixed; right: 0; top: 0; bottom: 0; box-shadow: var(--shadow); }
.main-content { flex: 1; margin-right: 250px; padding: 30px; }

.logo { display: flex; align-items: center; gap: 10px; padding: 10px 0; margin-bottom: 30px; }
.logo-icon { font-size: 28px; }
.logo-text { font-weight: 700; font-size: 18px; color: var(--primary); }

.nav { flex: 1; }
.nav-item { display: block; padding: 12px 16px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; margin-bottom: 4px; transition: all 0.2s; }
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active { background: var(--primary); color: white; }

.store-info { padding: 15px; background: var(--primary-light); border-radius: 8px; text-align: center; }
.store-name { font-weight: 700; font-size: 14px; }
.store-plan { font-size: 12px; color: var(--text-muted); }

.page-header { margin-bottom: 30px; }
.page-header h1 { font-size: 24px; }
.subtitle { color: var(--text-muted); margin-top: 5px; }
.subtitle-small { font-size: 13px; color: var(--text-muted); margin: 5px 0 15px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow); }
.stat-icon { font-size: 32px; }
.stat-number { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-muted); }

.actions-section { margin-bottom: 30px; }
.actions-section h2 { font-size: 18px; margin-bottom: 15px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.action-card { background: var(--card-bg); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border: 2px solid transparent; transition: all 0.2s; }
.action-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.action-icon { font-size: 32px; margin-bottom: 10px; }
.action-card h3 { font-size: 16px; margin-bottom: 5px; }
.action-card p { font-size: 13px; color: var(--text-muted); }

.card { background: var(--card-bg); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card h2 { font-size: 18px; margin-bottom: 15px; }

.input-group { display: flex; gap: 10px; }
.input { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border); font-family: inherit; font-size: 14px; }

.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-large { padding: 14px 28px; font-size: 16px; }
.btn-small { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: #fee; color: #c00; }

.table { width: 100%; border-collapse: collapse; }
.table th { background: #f8f9fa; padding: 14px 16px; text-align: right; font-weight: 700; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; }
.badge-green { background: #d4edda; color: #155724; }
.badge-orange { background: #fff3cd; color: #856404; }

.price-cheaper { color: var(--green); font-weight: 700; }
.price-expensive { color: var(--primary); font-weight: 700; }

.empty-state { padding: 40px; text-align: center; color: var(--text-muted); }
.empty-state a { color: var(--primary); }

.alert-item, .alert-row { display: flex; align-items: center; gap: 15px; padding: 15px; border-radius: 10px; margin-bottom: 10px; }
.alert-drop { background: #e8f5e9; }
.alert-rise { background: #fff3e0; }
.alert-unread { border-right: 4px solid var(--primary); }
.alert-icon { font-size: 24px; }
.alert-message { flex: 1; }
.alert-time { font-size: 12px; color: var(--text-muted); }

.alerts-list .alert-title { font-weight: 700; margin-bottom: 4px; }
.alerts-list .alert-prices { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.pagination { display: flex; gap: 5px; margin-top: 20px; justify-content: center; }
.page-link { padding: 8px 12px; border-radius: 6px; background: white; text-decoration: none; color: var(--text); border: 1px solid var(--border); }
.page-link.active { background: var(--primary); color: white; }

.install-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.install-card { background: white; border-radius: 20px; padding: 40px; max-width: 450px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.install-icon { font-size: 56px; margin-bottom: 15px; }
.install-card h1 { font-size: 24px; margin-bottom: 10px; }
.install-card > p { color: var(--text-muted); margin-bottom: 25px; }
.features-list { list-style: none; text-align: right; margin-bottom: 30px; }
.features-list li { padding: 8px 0; font-size: 15px; border-bottom: 1px solid var(--border); }
.features-list li:last-child { border-bottom: none; }

@media (max-width: 768px) { .sidebar { display: none; } .main-content { margin-right: 0; } }
/* Tabs */
.tabs { display: flex; gap: 5px; margin: 15px 0; border-bottom: 2px solid #e0e0e0; }
.tab-btn { padding: 10px 20px; border: none; background: none; cursor: pointer; font-size: 15px; color: #666; border-bottom: 3px solid transparent; transition: all 0.2s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: bold; }
.tab-content { padding: 15px 0; }
.input-group { display: flex; gap: 10px; margin: 10px 0; }
.input { flex: 1; padding: 10px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.btn-small { padding: 4px 12px; font-size: 13px; }
.btn-success { background: #27ae60; color: white; }
.btn-large { padding: 15px 30px; font-size: 18px; width: 100%; margin: 10px 0; }
.hint { margin-top: 20px; padding: 15px; background: #f9f9f9; border-radius: 8px; }
.hint ul { margin: 10px 0; padding-right: 20px; }
.hint a { color: var(--primary); text-decoration: none; }
.loading { padding: 20px; text-align: center; color: #666; }

/* Highlighted action card */
.action-highlight {
    border: 2px solid var(--primary) !important;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%) !important;
    position: relative;
}
.action-highlight::after {
    content: "جديد";
    position: absolute;
    top: -8px;
    left: 10px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}
.action-highlight .action-icon {
    font-size: 32px;
}
