:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #262626;
    --text-primary: #f5f5f5;
    --text-secondary: #c7c7c7;
    --accent: #3d8bfd;
    --accent-hover: #3475d4;
    --danger: #dc3545;
    --success: #28a745;
    --border-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.login-card {
    max-width: 420px;
    margin: 72px auto;
}

.card {
    background: linear-gradient(145deg, #1a1a1a, #202020);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 20px 45px var(--shadow-color);
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    resize: vertical;
    min-height: 140px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6ea8fe);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #5d92e6);
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(61, 139, 253, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.alert {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ff6b81;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

th,
td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: rgba(61, 139, 253, 0.08);
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, rgba(22, 22, 22, 0.95), rgba(10, 10, 10, 0.95));
    border-right: 1px solid var(--border-color);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.sidebar-Brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-Brand .logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-Brand .tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a .icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(61, 139, 253, 0.18);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(61, 139, 253, 0.2);
    color: var(--text-primary);
}

.sidebar-nav a:hover .icon,
.sidebar-nav a.active .icon {
    background: rgba(61, 139, 253, 0.3);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sidebar-footer .status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sidebar-footer .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.content-area {
    padding: 34px 40px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.welcome-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.welcome-text h1 {
    margin: 0;
    font-size: 1.6rem;
}

.welcome-text span {
    color: var(--text-secondary);
}

.quick-actions {
    display: flex;
    gap: 12px;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stats-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: linear-gradient(120deg, rgba(61, 139, 253, 0.15), rgba(61, 139, 253, 0.05));
}

.stats-card .label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.stats-card .value {
    font-size: 2.4rem;
    font-weight: 700;
}

.stats-card .trend {
    font-size: 0.85rem;
    color: var(--success);
}

.card-section-title {
    margin-bottom: 18px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.center {
    text-align: center;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.text-right {
    text-align: right;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(61, 139, 253, 0.2);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
}

.trend-up {
    color: var(--success);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Mobil Menü Butonu */
.mobile-menu-toggle {
    display: none;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Kurallar */
@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        font-size: 24px;
        width: 45px;
        height: 45px;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .mobile-menu-toggle:hover {
        background: var(--bg-tertiary);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
        flex-direction: column;
        padding: 20px;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
        border-right: none;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-nav {
        flex-direction: column;
        gap: 8px;
    }

    .content-area {
        padding: 24px 20px;
        margin-top: 60px;
        transition: margin-left 0.3s ease;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .quick-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .quick-actions .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px 10px;
    }

    .table-actions {
        flex-direction: column;
        gap: 6px;
    }

    .table-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px 12px;
    }

    .card {
        padding: 20px;
    }

    /* Login Sayfası Responsive */
    .container {
        padding: 20px;
    }

    .login-card {
        max-width: 100% !important;
        margin: 40px auto !important;
        padding: 28px 24px !important;
    }
}

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-card .value {
        font-size: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .welcome-text h1 {
        font-size: 1.3rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .sidebar-Brand .logo {
        font-size: 1.5rem;
    }

    .sidebar-footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        top: 15px;
        left: 15px;
        padding: 10px;
        font-size: 1.3rem;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .content-area {
        padding: 12px 10px;
        margin-top: 55px;
    }

    .card {
        padding: 16px;
        border-radius: 10px;
    }

    /* Login Sayfası Responsive */
    .login-card {
        max-width: 100% !important;
        margin: 20px auto !important;
        padding: 24px 20px !important;
    }

    .login-card h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .login-card .muted {
        font-size: 0.9rem;
    }

    .login-card input[type="text"],
    .login-card input[type="password"] {
        font-size: 16px; /* iOS zoom önleme */
        padding: 12px;
    }

    .login-card .btn {
        padding: 12px;
        font-size: 1rem;
    }

    .login-card .alert {
        padding: 12px;
        font-size: 0.9rem;
    }

    .stats-card {
        padding: 16px;
    }

    .stats-card .value {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    textarea,
    select {
        padding: 10px;
        font-size: 0.9rem;
    }

    .welcome-text h1 {
        font-size: 1.2rem;
    }

    .welcome-text span {
        font-size: 0.85rem;
    }

    .card-section-title {
        font-size: 1rem;
    }

    .sidebar-nav a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .sidebar-nav a .icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* Sidebar linklerine tıklandığında mobil menüyü kapat */
@media (max-width: 1024px) {
    .sidebar-nav a {
        cursor: pointer;
    }
}

/* Tablo responsive iyileştirmeleri */
@media (max-width: 768px) {
    .table-actions {
        flex-direction: column;
        gap: 6px;
    }

    .table-actions .btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    /* Tablolar için yatay kaydırma */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    table thead,
    table tbody,
    table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

/* Form responsive iyileştirmeleri */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        padding: 16px;
    }

    .content-header {
        flex-direction: column;
        gap: 16px;
    }

    .quick-actions {
        width: 100%;
    }

    .quick-actions .btn {
        width: 100%;
    }
}

