@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap&subset=latin-ext');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap&subset=latin-ext');

/* ============================================================
   BRAND TOKENS
   ============================================================ */
:root {
    --brand:       #245e83;
    --brand-dark:  #1a4661;
    --brand-light: #4a8ab0;
    --sidebar-bg:  #1a3a52;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(255,255,255,0.14);
    --text-main:   #364a63;
    --text-muted:  #8094ae;
    --border:      #e5e9f2;
    --bg-body:     #f4f7fa;
}

/* ============================================================
   GLOBAL
   ============================================================ */
body {
    font-family: Nunito, sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
}

a {
    color: var(--brand);
    text-decoration: none;
    background-color: transparent;
}

a:hover { color: var(--brand-dark); }

h1 {
    margin-bottom: .5rem;
    font-family: Nunito, sans-serif;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
}

/* ============================================================
   HEADER (açık tema)
   ============================================================ */
#header {
    width: auto;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: #fff;
    color: var(--text-main);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

#branding h1,
#branding h1 a:link,
#branding h1 a:visited {
    color: var(--brand);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
}

#header a:link, #header a:visited { color: var(--brand); }

#user-tools {
    float: right;
    padding: 0;
    margin: 0 0 0 20px;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: unset;
    text-transform: unset;
    text-align: right;
    color: var(--text-muted);
}

#user-tools a {
    color: var(--text-muted);
    border-bottom: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

#user-tools a:hover {
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-bottom: none;
}

#logout-form button {
    background: transparent;
    border: 0;
    float: none;
    color: var(--text-muted);
    font-size: 12px;
    font-family: Nunito, sans-serif;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

#logout-form button:hover {
    background: #ef4444;
    color: #fff;
}

#logout-form { display: inline-flex; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
div.breadcrumbs {
    background: #fff;
    padding: 10px 20px;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    text-align: left;
    font-weight: 500;
    margin: 0 0 20px 0;
}

div.breadcrumbs .ni { color: var(--brand); }
div.breadcrumbs a { color: var(--text-muted); }
div.breadcrumbs a:hover { color: var(--brand); }

/* ============================================================
   SIDEBAR — KOYU TEMA
   ============================================================ */
/* Container-fluid'i flex yap — submenu açılınca content kaymasını önler */
.main > .container-fluid {
    display: flex;
    align-items: flex-start;
}

#nav-sidebar {
    flex-shrink: 0;
    width: 220px;
    min-width: 220px;
    padding: 0 0 20px 0;
    background: var(--sidebar-bg);
    border-right: none;
    min-height: calc(100vh - 60px);
    box-shadow: 2px 0 8px rgba(0,0,0,0.12);
}

.content {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
}

#content { padding: unset; height: 100%; }

/* Nav menü — koyu zemin için renkler */
ul.nav-menu {
    list-style: none;
    padding: 12px 0 0 0;
    width: 100%;
}

ul.nav-menu > li > a {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    font-weight: 700;
    padding: 0 16px;
}

ul.nav-menu > li > ul { padding: 0; }

ul.nav-menu .dropdown { margin-bottom: 8px; }

ul.nav-menu .dropdown.active {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

ul.nav-menu .dropdown:not(.active) ul { display: block; }
ul.nav-menu .dropdown.active ul { display: block; }

ul.nav-menu li { list-style: none; }

ul.nav-menu li a i {
    font-size: 15px;
    margin-right: 8px;
    opacity: 0.8;
    width: 18px;
    text-align: center;
}

ul.nav-menu li a { margin-top: 2px; display: inline-flex; align-items: center; }

ul.nav-menu > li > ul > li > a {
    font-family: Nunito, sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: .01em;
    text-transform: none;
    padding: 7px 16px 7px 20px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
}

ul.nav-menu > li > ul > li > a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

ul.nav-menu > li > ul > li.active a {
    background: var(--sidebar-active);
    color: #fff;
    border-left: 3px solid var(--brand-light);
    padding-left: 17px;
}

/* Separator */
ul.nav-menu li.separator {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0;
    width: 100%;
    position: relative;
}

ul.nav-menu li.separator:after {
    display: none;
}

/* ============================================================
   CONTENT AREA — TABLOLAR
   ============================================================ */
#changelist-form .results {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Tablo başlıkları */
#result_list thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

#result_list thead th a:link,
#result_list thead th a:visited {
    color: #475569;
}

#result_list thead th.sorted {
    background: #eef4f9;
}

/* Tablo satırları */
#result_list tbody tr {
    transition: background 0.15s;
}

#result_list tbody tr:nth-child(even) {
    background: #fafbfd;
}

#result_list tbody tr:hover td {
    background: #eef4f9 !important;
}

#result_list td {
    padding: 9px 12px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
}

/* ============================================================
   FORM ELEMENTLERI
   ============================================================ */
input[type=text], input[type=password], input[type=email],
input[type=url], input[type=number], input[type=tel],
textarea, select, .vTextField {
    border: 1px solid #d1d9e6;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    font-family: Nunito, sans-serif;
    color: var(--text-main);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
input[type=url]:focus, input[type=number]:focus, input[type=tel]:focus,
textarea:focus, select:focus, .vTextField:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(36,94,131,0.12);
    outline: none;
}

.form-row label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #344357;
    margin-bottom: .4rem;
}

.form-row:last-child { border: 0; }

fieldset.module {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

/* ============================================================
   BUTONLAR
   ============================================================ */
.button, input[type=submit], input[type=button],
.submit-row input, a.button {
    background: var(--brand-light);
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-family: Nunito, sans-serif;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.2px;
}

.button:hover, input[type=submit]:hover, input[type=button]:hover {
    background: var(--brand-dark);
}

.button.default, input[type=submit].default, .submit-row input.default {
    background: var(--brand);
    font-weight: 700;
}

.button.default:hover, input[type=submit].default:hover {
    background: var(--brand-dark);
}

.submit-row {
    background: #f8fafc;
    border-top: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    padding: 12px 14px;
}

/* ============================================================
   OBJECT TOOLS (Ekle / Geçmiş butonları)
   ============================================================ */
.object-tools { margin-top: -35px; }

.object-tools a:link, .object-tools a:visited {
    background: var(--brand);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    letter-spacing: 0.3px;
    text-transform: none;
}

.object-tools a:hover { background: var(--brand-dark); }

.object-tools a.addlink,
.object-tools a.historylink {
    color: #fff;
    background-color: var(--brand);
    text-transform: none;
    border-color: var(--brand);
    font-weight: 700;
    border-radius: 6px;
}

/* ============================================================
   SAYFALAMA
   ============================================================ */
.paginator {
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.paginator a, .paginator .this-page {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    margin: 0 2px;
    font-weight: 600;
}

.paginator a {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--brand);
    transition: all 0.15s;
}

.paginator a:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.paginator .this-page {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
}

/* ============================================================
   MESAJ BANNER'LARI
   ============================================================ */
ul.messagelist li {
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   MODULE BAŞLIKLARI
   ============================================================ */
.module h2, .module caption, .inline-group h2 {
    background: var(--brand) !important;
    color: #fff;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* ============================================================
   FILTER SIDEBAR (sağ taraf filtre paneli)
   ============================================================ */
#changelist-filter {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

#changelist-filter h2 {
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

#changelist-filter h3 {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 14px 4px;
    margin: 0;
    border-top: 1px solid var(--border);
}

#changelist-filter ul { padding: 0 14px 10px; }
#changelist-filter li { font-size: 13px; padding: 2px 0; list-style: none; }
#changelist-filter li.selected a { color: var(--brand); font-weight: 700; }

/* ============================================================
   CHANGE-LIST TOOLBAR (Arama + Aksiyon)
   ============================================================ */
#changelist #toolbar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

#searchbar {
    border: 1px solid #d1d9e6;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#searchbar:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(36,94,131,0.12);
    outline: none;
}

/* ============================================================
   INLINE FORMLAR
   ============================================================ */
.tabular .form-row:not(.empty-form) { display: table-row; }

.inline-group .tabular td.original p {
    left: 7px !important;
    height: 2.1em !important;
    font-size: 10px !important;
    margin-top: -25px !important;
    display: none !important;
}

.inline-group .tabular tr.has_original td { padding-top: 0 !important; }

/* ============================================================
   YARDIMCI SINIFLARI
   ============================================================ */
.text-soft { color: var(--text-muted) !important; }

.btn-list-action {
    color: #526484;
    background-color: transparent;
    border-color: #dbdfea;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-list-action:hover {
    color: #fff;
    background-color: #526484;
    border-color: #526484;
    box-shadow: 0 0 9px rgba(0,0,0,.3);
}

td.field-action_links {
    width: max-content;
    display: flex;
}

/* ============================================================
   ALAN GENİŞLİKLERİ
   ============================================================ */
.vIntegerField { width: 10em; }

/* ============================================================
   COLLAPSE TOGGLE
   ============================================================ */
.collapse:not(.show) { display: block; }

fieldset.collapsed .collapse-toggle {
    background: transparent;
    display: inline;
    color: #374a63 !important;
    font-weight: 800 !important;
}

/* ============================================================
   SAYISAL ALANLAR
   ============================================================ */
tbody td.field-debit_balance,
tbody td.field-get_color_amount,
tbody td.field-amount,
tbody td.field-get_merchant_balance {
    text-align: right;
    font-weight: bold;
}

/* ============================================================
   ARAMA FİLTRE ALANI (change-list üstü)
   ============================================================ */
.change-list .filtered .results,
.change-list .filtered .paginator,
.filtered #toolbar,
.filtered div.xfull {
    margin-right: 0 !important;
    width: auto;
}

.filtered .actions {
    margin-right: 0 !important;
    border-right: none;
}

.search-filters { display: inline-block; }
.search-filters p {
    float: left;
    margin-bottom: 0;
    padding-left: 0;
    padding-right: 5px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 1280px) {
    .container, .container-lg, .container-md,
    .container-sm, .container-xl { max-width: 1260px; }
}
