/* Pirates Management — modern admin theme
   Renk paleti: dark navy + gold accent + soft greys
   Font: Montserrat (Google Fonts)                                   */

:root {
    --pm-bg:          #f4f6fb;
    --pm-card:        #ffffff;
    --pm-border:      #e3e8f0;
    --pm-text:        #1c2336;
    --pm-muted:       #6c7a93;
    --pm-primary:     #1a2540;          /* derin lacivert */
    --pm-primary-2:   #2a3960;
    --pm-accent:      #ffc107;          /* altın sarı */
    --pm-accent-dk:   #d39e00;
    --pm-success:     #20c997;
    --pm-danger:      #e63946;
    --pm-info:        #4a90e2;
    --pm-radius:      12px;
    --pm-shadow:      0 4px 16px rgba(28, 35, 54, 0.08);
    --pm-shadow-hov:  0 8px 28px rgba(28, 35, 54, 0.14);
}

* { box-sizing: border-box; }

html, body {
    font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--pm-text);
    background: var(--pm-bg);
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.01em; }
strong, b { font-weight: 600; }
.fw-bold, .text-bold { font-weight: 700; }
code, kbd, pre, samp { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.88em; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    background: linear-gradient(180deg, var(--pm-primary) 0%, var(--pm-primary-2) 100%);
    color: rgba(255, 255, 255, 0.85);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.2s ease;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}
.sidebar .brand-icon {
    font-size: 28px;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 10px;
    color: var(--pm-accent);
}
.sidebar .brand h5 {
    color: #fff; font-weight: 700; font-size: 1.05rem;
}
.sidebar .brand small {
    color: rgba(255,255,255,0.55); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: none !important;
    display: flex; align-items: center; gap: 10px;
}
.sidebar .nav-link i {
    width: 18px; text-align: center; font-size: 1rem;
    opacity: 0.85;
}
.sidebar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.07);
}
.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.18), rgba(255, 193, 7, 0.05));
    color: var(--pm-accent) !important;
    box-shadow: inset 3px 0 0 var(--pm-accent);
    font-weight: 600;
}
.sidebar hr { border-color: rgba(255,255,255,0.08); margin: 12px 0; }
.sidebar small.text-secondary {
    color: rgba(255,255,255,0.4) !important;
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    padding: 4px 12px 6px;
    display: block;
}

/* ============================================================
   TOPBAR
   ============================================================ */
header {
    background: var(--pm-card) !important;
    border-bottom: 1px solid var(--pm-border) !important;
    padding: 14px 24px !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
header h5 {
    color: var(--pm-text);
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 !important;
}
header .badge {
    background: linear-gradient(135deg, var(--pm-accent), var(--pm-accent-dk)) !important;
    color: var(--pm-primary) !important;
    font-weight: 700;
    font-size: 0.65rem;
    padding: 4px 8px;
    letter-spacing: 0.05em;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--pm-card);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow);
    transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--pm-shadow-hov); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--pm-border);
    font-weight: 600;
    color: var(--pm-text);
    padding: 14px 18px;
    font-size: 0.95rem;
}
.card-header i { color: var(--pm-accent); }
.card-body { padding: 18px; }

/* Stat cards (Dashboard) */
.stat-card {
    border-left: 4px solid var(--pm-accent);
    border-radius: var(--pm-radius);
    overflow: hidden;
}
.stat-card .stat-value {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--pm-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-card .stat-label {
    color: var(--pm-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 6px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.15s ease;
    font-size: 0.88rem;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

.btn-warning {
    background: linear-gradient(135deg, var(--pm-accent), var(--pm-accent-dk));
    border: none;
    color: var(--pm-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}
.btn-warning:hover { box-shadow: 0 4px 14px rgba(255, 193, 7, 0.45); color: var(--pm-primary); }

.btn-primary {
    background: linear-gradient(135deg, var(--pm-info), #2c6cb8);
    border: none;
}
.btn-success { background: linear-gradient(135deg, var(--pm-success), #17a589); border: none; }
.btn-danger  { background: linear-gradient(135deg, var(--pm-danger), #c1303e); border: none; }

/* ============================================================
   TABLES
   ============================================================ */
.table {
    --bs-table-bg: transparent;
    color: var(--pm-text);
}
.table thead th {
    background: #f8fafc;
    color: var(--pm-muted);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--pm-border);
}
.table tbody td { padding: 12px 14px; vertical-align: middle; border-color: var(--pm-border); }
.table tbody tr:hover { background: rgba(74, 144, 226, 0.04); }

/* DataTables hizalama */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    border: 1px solid var(--pm-border);
    padding: 4px 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 2px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--pm-border);
    padding: 9px 12px;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--pm-info);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}
.form-label {
    color: var(--pm-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
   BADGES & PROGRESS
   ============================================================ */
.badge {
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}
.badge.bg-secondary { background: #e9ecef !important; color: var(--pm-text) !important; }
.badge.bg-success   { background: var(--pm-success) !important; }
.badge.bg-danger    { background: var(--pm-danger) !important; }
.badge.bg-warning   { background: linear-gradient(135deg, var(--pm-accent), var(--pm-accent-dk)) !important; color: var(--pm-primary) !important; }
.progress { height: 18px; border-radius: 8px; background: #eef1f7; }
.progress-bar { background: linear-gradient(90deg, var(--pm-info), #1f6fc4); font-weight: 600; font-size: 0.7rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
    padding: 12px 16px;
    font-weight: 500;
}
.alert-success { background: rgba(32, 201, 151, 0.08); border-left-color: var(--pm-success); color: #0f6e54; }
.alert-danger  { background: rgba(230, 57, 70, 0.08);  border-left-color: var(--pm-danger);  color: #8e2532; }
.alert-warning { background: rgba(255, 193, 7, 0.1);   border-left-color: var(--pm-accent);  color: #735000; }
.alert-info    { background: rgba(74, 144, 226, 0.08); border-left-color: var(--pm-info);    color: #2a5a8e; }

/* ============================================================
   CURRENCY COLORS
   ============================================================ */
.currency-silver   { color: #8b95a1; font-weight: 600; }
.currency-sapphire { color: #2196f3; font-weight: 600; }
.currency-amber    { color: #f57c00; font-weight: 600; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at top left, rgba(255, 193, 7, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(74, 144, 226, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #0a1428 0%, #1a2540 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto Condensed', sans-serif;
}
.login-card {
    max-width: 400px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    padding: 36px !important;
}
.login-card h3 {
    background: linear-gradient(135deg, var(--pm-accent), var(--pm-accent-dk));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.6rem;
}

/* ============================================================
   PIVOT EDITOR (NPC sprite)
   ============================================================ */
.pivot-editor {
    background: #1a2540;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.pivot-editor canvas {
    background:
        linear-gradient(45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(-45deg, #2a2a2a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2a2a2a 75%),
        linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: #404040;
    cursor: crosshair;
    border-radius: 4px;
    max-width: 100%;
}
.pivot-info {
    color: rgba(255,255,255,0.85);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ============================================================
   MICRO ANIMATIONS
   ============================================================ */
@keyframes pm-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
main { animation: pm-fade-in 0.25s ease; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); }
