:root {
    --primary: #0b1110;
    --secondary: #123327;
    --accent: #c79a59;
    --accent-soft: #f4d28c;
    --paper: #fffaf0;
    --muted: #728277;
    --border: rgba(199, 154, 89, .26);
    --shadow: 0 24px 70px rgba(10, 17, 16, .14);
    --primary-fg: #fff8e9;
    --body-fg: #16211d;
    --body-bg: #f5f0e7;
    --link-fg: #8a5f31;
    --link-selected-fg: #c79a59;
    --header-color: #fff8e9;
    --header-bg: #0b1110;
    --header-link-color: #f4d28c;
    --breadcrumbs-fg: #f5dfad;
    --breadcrumbs-bg: #123327;
}

html { direction: rtl; }
body {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif !important;
    background:
        radial-gradient(circle at 20% 0%, rgba(199,154,89,.16), transparent 30%),
        linear-gradient(180deg, #f8f4eb 0%, #efe7da 100%) !important;
    color: var(--body-fg);
}

#container { min-width: 0; }
#header {
    background: linear-gradient(135deg, #07100d 0%, #123327 60%, #07100d 100%) !important;
    color: var(--primary-fg) !important;
    border-bottom: 1px solid var(--border);
    min-height: 82px;
    padding: 0 34px;
    box-shadow: 0 18px 44px rgba(6, 16, 13, .22);
}
#branding { float: right; }
#user-tools { float: left; padding-top: 22px; color: #f7e6bd; }
#user-tools a { color: #f4d28c !important; border-bottom-color: rgba(244,210,140,.45); }

.sam-admin-brand { display:flex; align-items:center; gap:16px; padding:12px 0; }
.sam-brand-mark {
    width:58px; height:58px; display:grid; place-items:center;
    border-radius:18px;
    background: rgba(255,255,255,.06);
    border:1px solid rgba(244,210,140,.28);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.sam-brand-mark img { width:38px; height:38px; object-fit:contain; }
#branding h1 { margin:0; }
#branding h1 a:link, #branding h1 a:visited {
    color: #f4d28c !important;
    font-weight: 900;
    font-size: 25px;
    text-decoration: none;
}
.sam-admin-brand p { margin:6px 0 0; color:rgba(255,248,233,.74); font-size:13px; }

div.breadcrumbs {
    background: rgba(18, 51, 39, .96) !important;
    color: #f5dfad !important;
    padding: 12px 34px;
    border-bottom: 1px solid var(--border);
}
div.breadcrumbs a { color:#f4d28c !important; }

#content { padding: 34px !important; }
#content h1 { color:#10231c; font-weight:900; margin-bottom:24px; }

.sam-dashboard { max-width: 1320px; margin: 0 auto; }
.sam-hero-panel {
    position: relative;
    overflow: hidden;
    display:flex; justify-content:space-between; gap:24px; align-items:center;
    padding:34px;
    border-radius:28px;
    background:
        linear-gradient(135deg, rgba(8,17,14,.98), rgba(18,51,39,.94)),
        radial-gradient(circle at 20% 0%, rgba(244,210,140,.2), transparent 40%);
    color:#fff8e9;
    border:1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom:22px;
}
.sam-hero-panel:after {
    content:""; position:absolute; inset:auto -80px -120px auto; width:360px; height:360px;
    border-radius:50%; border:1px solid rgba(244,210,140,.18);
}
.sam-kicker { color:#f4d28c; font-weight:800; letter-spacing:.04em; }
.sam-hero-panel h2 { margin:10px 0; font-size:30px; color:#fff8e9; }
.sam-hero-panel p { margin:0; color:rgba(255,248,233,.76); }
.sam-hero-actions { display:flex; gap:12px; flex-wrap:wrap; }
.sam-hero-actions a,
.sam-quick-grid a,
.sam-model-card a,
.object-tools a,
.button,
input[type=submit],
.submit-row input,
a.button {
    border-radius: 999px !important;
    background: linear-gradient(135deg, #d7ad6a, #b98543) !important;
    color: #0b1110 !important;
    border: 0 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(95, 62, 24, .18);
}
.sam-hero-actions a { padding:12px 18px; display:inline-flex; }

.sam-stat-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:16px; margin-bottom:22px; }
.sam-stat-card {
    display:block; padding:22px; min-height:110px;
    border-radius:22px;
    background: rgba(255,250,240,.9);
    border:1px solid rgba(199,154,89,.22);
    box-shadow: 0 16px 42px rgba(10,17,16,.08);
    text-decoration:none !important;
    color:#10231c !important;
}
.sam-stat-card span { color:#b98543; font-size:12px; font-weight:900; }
.sam-stat-card strong { display:block; margin:10px 0 6px; font-size:22px; }
.sam-stat-card small { color:#68786d; }

.sam-admin-columns { display:grid; grid-template-columns: 1fr 1fr; gap:18px; margin-bottom:22px; }
.sam-module-card,
.module,
.inline-group {
    background: rgba(255,250,240,.94) !important;
    border:1px solid rgba(199,154,89,.24) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 46px rgba(10,17,16,.08);
    overflow: hidden;
}
.sam-module-card { padding: 24px; }
.sam-section-title h3 { margin:0 0 6px; font-size:20px; color:#10231c; }
.sam-section-title p { margin:0 0 18px; color:#6f7d73; }
.sam-quick-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.sam-quick-grid a { padding:14px 16px; text-align:center; }
.sam-check-list { margin:0; padding:0 20px 0 0; line-height:2.2; color:#34443c; }
.sam-check-list li::marker { color:#c79a59; }

.sam-app-block { margin-top:18px; }
.sam-app-block h4 {
    margin:0 0 10px; padding:12px 16px; border-radius:16px;
    color:#f4d28c; background:linear-gradient(135deg, #123327, #0b1110);
}
.sam-model-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; }
.sam-model-card { padding:16px; border-radius:18px; background:#fff; border:1px solid rgba(199,154,89,.2); }
.sam-model-card strong { display:block; margin-bottom:12px; color:#10231c; }
.sam-model-card div { display:flex; gap:8px; }
.sam-model-card a { padding:7px 12px; font-size:12px; }

.module h2,
.module caption,
.inline-group h2 {
    background: linear-gradient(135deg, #123327, #0b1110) !important;
    color: #f4d28c !important;
    font-weight:900;
    padding:14px 16px !important;
}
.module table { border-collapse: separate; border-spacing: 0; }
.module th, .module td { padding: 12px 14px !important; }
.row1 { background:#fffaf0 !important; }
.row2 { background:#f7f0e5 !important; }

#changelist, .change-form #content-main form, .delete-confirmation form {
    background: rgba(255,250,240,.95);
    border:1px solid rgba(199,154,89,.24);
    border-radius:24px;
    box-shadow: 0 18px 46px rgba(10,17,16,.08);
    overflow:hidden;
}
#changelist-filter { border-radius:20px; border:1px solid rgba(199,154,89,.24); overflow:hidden; }
#toolbar { background:#fffaf0 !important; border-bottom:1px solid rgba(199,154,89,.2); }
input, textarea, select, .vTextField {
    border-radius:12px !important;
    border:1px solid rgba(18,51,39,.18) !important;
    padding:10px 12px !important;
}
fieldset.module { padding-bottom:16px; }
.submit-row { background:#fffaf0 !important; border-top:1px solid rgba(199,154,89,.2) !important; }

a:link, a:visited { color:#8a5f31; }
.object-tools { float:left; }
.messagelist li { border-radius:14px; box-shadow:0 10px 30px rgba(10,17,16,.08); }

@media (max-width: 980px) {
    #header { padding:0 16px; }
    #content { padding:18px !important; }
    .sam-hero-panel, .sam-admin-columns { grid-template-columns:1fr; flex-direction:column; align-items:flex-start; }
    .sam-stat-grid, .sam-model-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 640px) {
    .sam-stat-grid, .sam-model-grid, .sam-quick-grid { grid-template-columns:1fr; }
}
