:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: radial-gradient(circle at top right, #1e1b4b, #030712);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --accent: #8b5cf6;
}

.login-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

.login-container {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-primary);
    position: relative;
}

.background-radial {
    position: absolute;
    width: 150vw;
    height: 150vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: -50vw;
    right: -50vw;
    z-index: 1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.login-box {
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 420px;
}

.register-box {
    max-width: 500px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-container {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.button-row-register {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-top: 10px;
}

.login-link {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(to right, #818cf8, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.step {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease forwards;
}

.step.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-left: 4px;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#username {
    text-transform: lowercase;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 10px 0;
}

.checkbox-group input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    cursor: pointer;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.status-message {
    margin-top: 20px;
    font-size: 0.9rem;
    min-height: 20px;
}

.error {
    color: var(--error-color);
}

.success {
    color: var(--success-color);
}

/* Dashboard Native Web Layout */
.dashboard-wrap {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-gradient);
    color: var(--text-primary);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 100;
}

.sidebar-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
    background: linear-gradient(to right, #818cf8, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-left: 10px;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item .icon {
    font-size: 1.4rem;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    gap: 30px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.welcome-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Grid Layout for Cards */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.primary-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.salary-hero {
    padding: 40px;
    border-radius: 30px;
    text-align: left;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(192, 132, 252, 0.1));
}

.salary-hero .label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.salary-hero .amount {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Widgets */
.widget-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-card {
    padding: 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.widget-card .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.widget-info .val {
    font-size: 1.2rem;
    font-weight: 600;
}

.widget-info .lbl {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Reports & Tables */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.filters {
    display: flex;
    gap: 15px;
}

.select-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    font-family: 'Outfit', sans-serif;
    outline: none;
    cursor: pointer;
}

.select-modern option {
    background: #1e1b4b;
    color: white;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-card {
    padding: 20px;
    border-radius: 20px;
    text-align: center;
}

.summary-card .lbl {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.summary-card .val {
    font-size: 1.4rem;
    font-weight: 600;
}

.table-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    overflow-x: auto;
    /* Scroll for mobile */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
    /* Force scroll on small screens */
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 18px 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge-yevmiye {
    color: #818cf8;
    font-weight: 600;
}

.badge-avans {
    color: #f87171;
    font-weight: 600;
}

/* Mobile Navigation */
.mobile-nav {
    display: none !important;
    /* Masaüstünde KESİNLİKLE gizli */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 10px 0;
    z-index: 1000;
    justify-content: space-around;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    flex: 1;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item span:first-child {
    font-size: 1.4rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    .mobile-nav {
        display: flex !important;
        /* Mobilde GÖRÜNÜR */
    }

    .main-content {
        padding: 20px;
        padding-bottom: 90px;
    }

    .salary-hero .amount {
        font-size: 2.5rem;
    }

    .report-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .filters {
        width: 100%;
        overflow-x: auto;
    }

    /* Mobile Table Fix - REVERTED & SIMPLIFIED */
    .table-container {
        /* Negatif marginleri kaldır */
        width: 100%;
        border-radius: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        white-space: nowrap;
        /* Satır kayması olmasın, scroll olsun */
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

/* Settings Page */
.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.settings-card {
    padding: 30px;
    border-radius: 24px;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.settings-icon {
    font-size: 1.5rem;
}

.settings-card h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.settings-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-modern {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.input-modern:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-modern::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* .status-message kaldırıldı, yukarıda 241. satırda tanımlı */

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: white;
}

/* Loading Dialog */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dialog-overlay.active {
    display: flex;
}

.dialog-box {
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dialog-box p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ad Overlay System - ENFORCED FULL SCREEN */
.ad-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000000 !important;
    /* Reklam sırasında arka plan tamamen siyah olsun */
    z-index: 999999 !important;
    /* Her şeyin üstünde */
    display: none;
    /* JS ile flex yapılacak */
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-box {
    width: 95% !important;
    max-width: 500px !important;
    background: #111827 !important;
    border-radius: 24px;
    padding: 20px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.ad-timer {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ad-content {
    width: 100%;
    min-height: 250px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

#btn-ad-close {
    width: 100%;
    padding: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#btn-ad-close:disabled {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.8;
}