* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #0a0f1e; color: #e2e8f0; direction: rtl; font-size: 14px; height: 100vh; overflow: hidden; }
a { text-decoration: none; color: inherit; }

/* ═══ Layout ═══ */
.app-layout { display: flex; height: 100vh; }
.sidebar { width: 260px; background: #111827; border-left: 1px solid #1f2937; display: flex; flex-direction: column; flex-shrink: 0; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ═══ Sidebar ═══ */
.sidebar-header { padding: 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #1f2937; }
.sidebar-logo { width: 40px; height: 40px; border-radius: 8px; }
.brand-name { font-size: 18px; font-weight: bold; color: #fbbf24; }
.sidebar-nav { padding: 15px 10px; flex: 1; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 8px; color: #9ca3af; margin-bottom: 4px; transition: 0.2s; font-size: 13px; }
.nav-item:hover, .nav-item.active { background: #1f2937; color: #fff; }
.nav-icon { font-size: 16px; }
.nav-divider { height: 1px; background: #1f2937; margin: 15px 0; }
.nav-title { font-size: 11px; color: #6b7280; padding: 0 15px; margin-bottom: 8px; text-transform: uppercase; }
.sidebar-footer { padding: 20px; border-top: 1px solid #1f2937; }
.btn-logout { width: 100%; background: transparent; border: 1px solid #374151; color: #ef4444; padding: 10px; border-radius: 8px; cursor: pointer; transition: 0.2s; font-family: inherit; }
.btn-logout:hover { background: #7f1d1d; color: white; border-color: #dc2626; }
.footer-credit { text-align: center; font-size: 10px; color: #4b5563; margin-top: 15px; }

/* ═══ Header ═══ */
.top-header { height: 64px; background: #111827; border-bottom: 1px solid #1f2937; display: flex; justify-content: space-between; align-items: center; padding: 0 25px; }
.header-title { font-size: 16px; font-weight: bold; color: #f3f4f6; }
.user-avatar { width: 35px; height: 35px; border-radius: 50%; border: 2px solid #fbbf24; }

/* ═══ Content ═══ */
.content-wrapper { padding: 25px; overflow-y: auto; flex: 1; }
.page-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.page-header h1 { font-size: 22px; color: #f3f4f6; flex: 1; }

/* ═══ Cards & Grids ═══ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.tenant-card { background: #111827; border: 1px solid #1f2937; border-radius: 12px; padding: 20px; transition: 0.2s; }
.tenant-card:hover { border-color: #fbbf24; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.card-title h2 { font-size: 16px; color: #f3f4f6; margin-bottom: 4px; }
.id-badge { background: #1f2937; color: #9ca3af; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-family: monospace; }
.status { padding: 4px 10px; border-radius: 20px; font-size: 11px; }
.status.running { background: #064e3b; color: #6ee7b7; }
.status.stopped { background: #78350f; color: #fcd34d; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: #9ca3af; }
.info-row code { background: #1f2937; padding: 2px 6px; border-radius: 4px; font-family: monospace; direction: ltr; }
.card-actions { display: flex; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #1f2937; }
.card-actions .btn { flex: 1; }

/* ═══ Buttons ═══ */
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-family: inherit; cursor: pointer; transition: 0.2s; border: none; text-align: center; }
.btn:hover { opacity: 0.9; }
.btn.primary { background: #2563eb; color: white; }
.btn.success { background: #059669; color: white; }
.btn.danger { background: #dc2626; color: white; }
.btn.ghost { background: transparent; border: 1px solid #374151; color: #d1d5db; }
.btn.big { padding: 12px 24px; font-size: 14px; }

/* ═══ Forms ═══ */
.form-card { background: #111827; padding: 25px; border-radius: 12px; border: 1px solid #1f2937; max-width: 800px; }
.form-section { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #1f2937; }
.form-section h3 { color: #fbbf24; font-size: 14px; margin-bottom: 15px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.form-row label { color: #d1d5db; font-size: 13px; }
.form-row input, .form-row select, .form-row textarea { padding: 10px 12px; background: #0f172a; border: 1px solid #374151; border-radius: 8px; color: #f3f4f6; font-family: inherit; font-size: 13px; }
.form-row input:focus { outline: none; border-color: #fbbf24; }
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }

/* ═══ Stats ═══ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; margin-bottom: 25px; }
.stat-card { background: #111827; padding: 20px; border-radius: 12px; border-right: 4px solid #fbbf24; }
.stat-icon { font-size: 24px; margin-bottom: 10px; }
.stat-value { font-size: 28px; font-weight: bold; color: #f3f4f6; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: #9ca3af; }
.stat-sub { font-size: 11px; color: #6b7280; margin-top: 8px; padding-top: 8px; border-top: 1px solid #1f2937; }

/* ═══ Alerts ═══ */
.alert { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; }
.alert.error { background: #7f1d1d; color: #fecaca; border: 1px solid #dc2626; }
.alert.success { background: #064e3b; color: #d1fae5; border: 1px solid #059669; }

/* ═══ Login ═══ */
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; background: #0a0f1e; }
.login-box { background: #111827; padding: 40px; border-radius: 16px; width: 100%; max-width: 400px; text-align: center; border: 1px solid #1f2937; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.login-logo { width: 100px; margin-bottom: 20px; }
.login-box h1 { color: #f3f4f6; margin-bottom: 8px; font-size: 20px; }
.login-box input { width: 100%; padding: 12px; background: #0f172a; border: 1px solid #374151; border-radius: 8px; color: #fff; margin-bottom: 15px; font-family: inherit; }
.login-box button { width: 100%; padding: 12px; background: #fbbf24; color: #000; font-weight: bold; border: none; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px; }

/* ═══ Settings Hub ═══ */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.settings-card { display: flex; align-items: center; gap: 15px; background: #111827; padding: 20px; border-radius: 12px; border: 1px solid #1f2937; transition: 0.2s; }
.settings-card:hover { border-color: #fbbf24; transform: translateY(-2px); }
.sc-icon { font-size: 28px; }
.sc-content { flex: 1; }
.sc-content h3 { font-size: 14px; color: #f3f4f6; margin-bottom: 4px; }
.sc-content p { font-size: 11px; color: #9ca3af; }
.sc-arrow { color: #4b5563; }
