/* ============================================
   RinaV Roleplay — Stopaj & Vergi & Hurda
   Premium Dark Theme with Glassmorphism
   ============================================ */

/* === CSS Variables / Design Tokens === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a28;
    --bg-card: rgba(20, 20, 35, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b82;
    --text-accent: #a78bfa;

    --accent-primary: #8B5CF6;
    --accent-secondary: #06B6D4;
    --accent-gradient: linear-gradient(135deg, #8B5CF6, #06B6D4);
    --accent-gradient-hover: linear-gradient(135deg, #7C3AED, #0891B2);

    --positive: #34D399;
    --positive-bg: rgba(52, 211, 153, 0.1);
    --negative: #F87171;
    --negative-bg: rgba(248, 113, 113, 0.1);
    --warning: #FBBF24;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7C3AED;
}

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #fff;
}

/* === Background Particles === */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle linear infinite;
    opacity: 0;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* === Glass Utility === */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    transition: all var(--transition-base);
}

.glass:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
}

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 24px;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.4));
    transition: transform var(--transition-base);
}

.logo-icon:hover img {
    transform: scale(1.08) rotate(-3deg);
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-text .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #fff;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-icon {
    font-size: 1rem;
}

.badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Main Content === */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    position: relative;
    z-index: 1;
}

/* === Stats Section === */
.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-base);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    font-size: 1.8rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(139, 92, 246, 0.1);
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* === Quick Calculator === */
.quick-calc {
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 28px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-title .subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.title-icon {
    font-size: 1.2rem;
}

.calc-row {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.calc-input-group {
    flex: 0 0 260px;
}

.calc-input-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.calc-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    outline: none;
    transition: all var(--transition-base);
}

.calc-input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.calc-input-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.calc-result-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.calc-result {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    min-width: 180px;
}

.calc-result-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.calc-result-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}

.calc-result-value.negative {
    color: var(--negative);
    background: var(--negative-bg);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
}

.calc-result-value.positive {
    color: var(--positive);
    background: var(--positive-bg);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
}

.calc-arrow {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* === Controls / Search === */
.controls-section {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-radius: var(--radius-lg);
    height: 52px;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    opacity: 0;
    pointer-events: none;
}

.search-clear.visible {
    opacity: 1;
    pointer-events: all;
}

.search-clear:hover {
    color: var(--negative);
    background: var(--negative-bg);
}

.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Partner Toggle Button */
.partner-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: var(--radius-lg);
    height: 52px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.partner-toggle-btn:hover {
    color: #fff;
    background: rgba(236, 72, 153, 0.08);
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.1);
}

.partner-toggle-btn.active {
    color: #FFF5F7;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
    border-color: #EC4899;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
    text-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

.partner-btn-icon {
    font-size: 1.1rem;
    transition: transform var(--transition-base);
}

.partner-toggle-btn.active .partner-btn-icon {
    transform: scale(1.25) rotate(-10deg);
    filter: drop-shadow(0 0 5px #EC4899);
}

/* Premium Toggle Button */
.premium-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: var(--radius-lg);
    height: 52px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    transition: all var(--transition-base);
    font-family: var(--font-primary);
}

.premium-toggle-btn:hover {
    color: #fff;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.premium-toggle-btn.active {
    color: #FFFbeb;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(245, 158, 11, 0.2));
    border-color: #F59E0B;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.premium-btn-star {
    font-size: 1rem;
    transition: transform var(--transition-base);
}

.premium-toggle-btn.active .premium-btn-star {
    transform: scale(1.2) rotate(15deg);
    filter: drop-shadow(0 0 5px #F59E0B);
}

/* In-Row Textbox Input Styles */
.row-ic-input {
    width: 100%;
    max-width: 130px;
    padding: 6px 12px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    outline: none;
    transition: all var(--transition-fast);
}

.row-ic-input:focus {
    border-color: #F59E0B;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.row-ic-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

/* Selected row highlighted styling */
tbody tr.selected-row {
    background: rgba(139, 92, 246, 0.12) !important;
    border-left: 3px solid var(--accent-primary);
}

tbody tr.selected-row td {
    color: #fff;
}


.sort-group,
.price-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: var(--radius-lg);
    height: 52px;
}

.sort-group label,
.price-filter label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.sort-group select,
.price-filter select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.sort-group select:focus,
.price-filter select:focus {
    border-color: var(--accent-primary);
}

.sort-group select option,
.price-filter select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* === Table Section === */
.table-section {
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 0;
}

.table-header-bar {
    padding: 22px 28px 0;
}

.table-wrapper {
    overflow-x: auto;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    position: sticky;
    top: 0;
    z-index: 5;
}

thead tr {
    background: rgba(139, 92, 246, 0.08);
}

th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-glass);
    user-select: none;
}

th.sortable {
    cursor: pointer;
    transition: color var(--transition-fast);
}

th.sortable:hover {
    color: var(--accent-primary);
}

th.sortable.active {
    color: var(--accent-primary);
}

.sort-arrow {
    font-size: 0.75rem;
    opacity: 0.4;
    transition: opacity var(--transition-fast);
}

th.sortable:hover .sort-arrow,
th.sortable.active .sort-arrow {
    opacity: 1;
}

.th-index {
    width: 50px;
    text-align: center;
}

.th-name {
    min-width: 180px;
}

.th-price,
.th-stopaj,
.th-net,
.th-muayene,
.th-sigorta,
.th-sigorta-toplam {
    min-width: 150px;
    text-align: right;
}

.th-ooc {
    min-width: 100px;
    text-align: right;
}

.th-aktarim {
    min-width: 130px;
    text-align: right;
}

.th-ic-input {
    min-width: 160px;
    text-align: right;
}

.th-stopaj-ic {
    min-width: 160px;
    text-align: right;
}

tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    animation: fadeInRow 0.3s ease forwards;
    opacity: 0;
}

@keyframes fadeInRow {
    to {
        opacity: 1;
    }
}

tbody tr:hover {
    background: rgba(139, 92, 246, 0.06);
}

td {
    padding: 13px 20px;
    vertical-align: middle;
}

#vehicleTable td:first-child {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.cell-name {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: 0.2px;
}

.cell-price {
    text-align: right;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
}

.cell-stopaj,
.cell-muayene,
.cell-sigorta,
.cell-sigorta-toplam {
    text-align: right;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--negative);
}

.cell-ooc {
    text-align: right;
    min-width: 100px;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
}

.cell-aktarim {
    text-align: right;
    min-width: 130px;
    font-weight: 600;
    color: var(--warning);
}

.cell-ic-input {
    text-align: right;
    min-width: 160px;
}

.cell-stopaj-ic {
    text-align: right;
    min-width: 160px;
    font-family: var(--font-display);
    font-weight: 700;
}

.cell-free {
    text-align: right;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-muted);
    font-style: italic;
}

.positive {
    color: var(--positive) !important;
}

.negative {
    color: var(--negative) !important;
}

tr.free-row {
    opacity: 0.5;
}

/* === Table Footer === */
.table-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border-glass);
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

/* === No Results === */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results-text {
    color: var(--text-muted);
    font-size: 1rem;
}

/* === Scroll to Top === */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md), 0 0 20px rgba(139, 92, 246, 0.3);
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
    pointer-events: none;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.scroll-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(139, 92, 246, 0.5);
}

.scroll-top svg {
    width: 22px;
    height: 22px;
    color: white;
}

/* === Footer === */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-glass);
    padding: 28px 24px;
    text-align: center;
}

.footer-inner p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-sub {
    margin-top: 4px;
    font-size: 0.75rem !important;
    color: var(--text-muted);
    opacity: 0.5;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 14px 0;
        gap: 12px;
    }
    .header-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}

@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: 1fr 1fr;
    }
    .calc-row {
        flex-direction: column;
        align-items: stretch;
    }
    .calc-input-group {
        flex: 1;
    }
    .calc-result-group {
        flex-direction: column;
        gap: 10px;
    }
    .calc-arrow {
        transform: rotate(90deg);
        text-align: center;
    }
    .controls-section {
        flex-direction: column;
    }
    .filter-controls {
        flex-direction: column;
    }
    .sort-group, .price-filter {
        width: 100%;
    }
    th, td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .table-header-bar {
        padding: 18px 18px 0;
    }
    .table-footer {
        padding: 14px 18px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 14px 40px;
    }
    .stats-section {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 16px;
    }
    .logo-text h1 {
        font-size: 1.15rem;
    }
    .quick-calc {
        padding: 20px;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* === Animations === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-section,
.quick-calc,
.controls-section,
.table-section {
    animation: slideUp 0.5s ease forwards;
    animation-delay: 0.15s;
}

/* ============================================
   ADMIN PANEL & MODALS SYSTEM
   ============================================ */

/* Modal & Panel Overlay Blur */
.admin-modal-overlay,
.admin-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 4, 6, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    padding: 20px;
}

.admin-modal-overlay.active,
.admin-panel-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Admin Login Modal Styles */
.admin-modal {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glass);
    background: rgba(18, 18, 28, 0.75);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(139, 92, 246, 0.15);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.admin-modal-overlay.active .admin-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    position: relative;
}

.modal-icon {
    font-size: 1.25rem;
    margin-right: 12px;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close,
.panel-close {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 4px;
}

.modal-close:hover,
.panel-close:hover {
    color: var(--negative);
}

.modal-body {
    padding: 24px;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.error-msg {
    color: var(--negative);
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}

.error-msg.visible {
    display: block;
    animation: shake 0.3s ease;
}

/* Buttons Styling */
.admin-btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    font-family: var(--font-primary);
}

.admin-btn-primary:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.3);
}

.admin-btn-secondary {
    padding: 8px 16px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.admin-btn-secondary:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-glass-hover);
}

/* Admin Panel Container Styles */
.admin-panel {
    width: 100%;
    max-width: 1000px;
    height: 80vh;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glass);
    background: rgba(18, 18, 28, 0.8);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform var(--transition-base);
}

.admin-panel-overlay.active .admin-panel {
    transform: translateY(0);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-glass);
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.panel-icon {
    font-size: 1.8rem;
    color: var(--accent-primary);
}

.panel-header h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.panel-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 36px;
}

.panel-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar Navigation */
.panel-sidebar {
    width: 220px;
    border-right: 1px solid var(--border-glass);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-tab {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.sidebar-tab:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.sidebar-tab.active {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.05);
}

/* Main Content Panel */
.panel-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tab-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-btn-add {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--positive-bg);
    color: var(--positive);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.admin-btn-add:hover {
    background: var(--positive);
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.admin-search-wrapper {
    margin-bottom: 16px;
}

.admin-input-search {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition-fast);
}

.admin-input-search:focus {
    border-color: var(--accent-primary);
}

/* Admin Table Design */
.admin-table-wrapper {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: rgba(18, 18, 28, 0.4);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-table th {
    padding: 16px 24px;
    background: #161622;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    width: 50%;
    text-align: left;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
    width: 30%;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
    width: 20%;
    text-align: center;
}

.admin-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    vertical-align: middle;
    color: var(--text-primary);
}

.admin-table tbody tr {
    animation: none;
    opacity: 1;
    transition: background-color var(--transition-fast);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.admin-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    margin: 0 4px;
}

.admin-btn-icon.edit:hover {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
}

.admin-btn-icon.delete:hover {
    background: var(--negative-bg);
    color: var(--negative);
}

/* Global Settings UI */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.settings-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-card label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-input-setting {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    transition: all var(--transition-fast);
}

.admin-input-setting:focus {
    border-color: var(--accent-primary);
}

.setting-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 22px;
    border-radius: var(--radius-md);
    background: rgba(18, 18, 28, 0.9);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.toast.success {
    border-left: 4px solid var(--positive);
}

.toast.error {
    border-left: 4px solid var(--negative);
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

/* Core System Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(15px) scale(0.9);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Admin Responsive Design */
@media (max-width: 768px) {
    .admin-panel {
        height: 90vh;
    }
    .panel-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .panel-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .panel-content {
        flex-direction: column;
    }
    .panel-sidebar {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        overflow-x: auto;
        padding: 12px;
    }
    .sidebar-tab {
        white-space: nowrap;
        padding: 8px 14px;
    }
    .panel-main {
        padding: 20px;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}


.quick-calc {
    animation-delay: 0.05s;
}

.controls-section {
    animation-delay: 0.1s;
}

.table-section {
    animation-delay: 0.15s;
}

@media (max-width: 768px) {
    .ev-calc-grid,
    .isyeri-calc-grid,
    .degisim-calc-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Hide input up/down arrow spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

.degisim-select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}
