/* Bisicab Takip - Kullanılabilir, masaüstü+mobil uyumlu tema */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1f4ca3;
    --primary-strong: #16356f;
    --accent: #0b8f6a;
    --danger: #c0392b;
    --warn: #a06a13;
    --bg: #eef2f7;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #dbe3ee;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 12px 26px rgba(31, 41, 55, 0.12);
    --shadow-sm: 0 4px 14px rgba(31, 41, 55, 0.09);
}

body {
    font-family: "Segoe UI", "Tahoma", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 92% 8%, rgba(31, 76, 163, 0.16), transparent 25%),
        radial-gradient(circle at 8% 94%, rgba(11, 143, 106, 0.12), transparent 30%),
        var(--bg);
    line-height: 1.5;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.login-simple {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-shell-simple {
    width: 100%;
    display: block;
    border-radius: 18px;
    border: 1px solid #cfdcee;
    box-shadow: var(--shadow);
    background: var(--card);
}

.login-badge-simple {
    color: #204b9d;
    background: #ebf2ff;
    border-color: #d2e0fb;
}

.login-shell {
    width: min(1020px, 100%);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #cfdcee;
    box-shadow: var(--shadow);
    background: var(--card);
}

.login-hero {
    background: linear-gradient(140deg, #173a7a, #1f4ca3 55%, #0b8f6a);
    color: #f4f8ff;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e5f0ff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.login-hero h1 {
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 42px;
    line-height: 1.04;
    color: #ffffff;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    max-width: 40ch;
}

.login-highlights {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.login-highlights span {
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(10, 20, 40, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card {
    padding: 34px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card h2 {
    margin: 0;
    font-size: 30px;
    color: #14356d;
}

.login-card-note {
    margin-top: 8px;
    margin-bottom: 18px;
}

.login-form .form-group {
    margin-bottom: 14px;
}

.login-form input {
    padding: 13px 14px;
    font-size: 15px;
}

.login-footnote {
    margin-top: 12px;
    font-size: 12px;
    color: #718096;
}

.login-copyright {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.container {
    width: min(1180px, 100% - 28px);
    margin: 20px auto 28px;
}

header,
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.brand {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

header nav,
.topbar nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-nav .nav-link,
header nav a,
.topbar nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color 0.18s ease;
}

.topbar-nav .nav-link:hover,
header nav a:hover,
.topbar nav a:hover {
    background: rgba(255, 255, 255, 0.16);
}

.topbar-nav .nav-link-active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.28);
}

.topbar-nav .nav-link-logout {
    background: rgba(12, 23, 44, 0.28);
}

.hamburger {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 4px 0;
    border-radius: 2px;
    background: #fff;
}

h1 {
    font-size: 29px;
    margin-bottom: 14px;
    color: #0f2f67;
}

h2 {
    font-size: 23px;
    margin-bottom: 10px;
    color: #133b7f;
}

h3 {
    font-size: 18px;
}

p {
    color: var(--muted);
}

.section-card,
.main-content,
.rides-list-section,
.chart-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    margin-top: 16px;
}

.card-subtitle {
    margin-top: 4px;
    color: var(--muted);
}

.alert {
    margin-top: 14px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-weight: 600;
}

.alert-success {
    color: #13613a;
    background: #eafaf2;
    border-color: #9fe2bd;
}

.alert-error {
    color: #7c1f1f;
    background: #fff1f1;
    border-color: #f3c1c1;
}

.btn,
button,
a.btn {
    appearance: none;
    border: 1px solid transparent;
    background: #f4f6fa;
    color: #1f2937;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    font-size: 14px;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover,
button:hover,
a.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.btn-primary,
button.btn-primary {
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #fff;
}

.btn-danger,
button.btn-danger {
    background: #fff2f1;
    color: var(--danger);
    border-color: #f0c8c4;
}

.btn-small {
    padding: 6px 10px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.quick-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ongoing-ride-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ongoing-ride-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.collapsible-card {
    overflow: hidden;
}

.collapsible-header {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.collapsible-header::-webkit-details-marker {
    display: none;
}

.collapsible-header h2 {
    margin: 0;
}

.collapsible-hint {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.collapsible-card[open] .collapsible-header {
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-group-span-2 {
    grid-column: span 2;
}

.form-group-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    font-size: 14px;
    color: #273244;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 11px;
    font-size: 15px;
    line-height: 1.4;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-weight: 700;
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.is-hidden {
    display: none;
}

.route-subnote {
    margin-top: 5px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #6d92d3;
    box-shadow: 0 0 0 3px rgba(31, 76, 163, 0.15);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stat-card {
    border-radius: 12px;
    border: 1px solid #d7e2f4;
    background: #f5f8ff;
    padding: 14px;
}

.stat-card.success {
    border-color: #b8e4d4;
    background: #effbf7;
}

.stat-card.warning {
    border-color: #edd7ac;
    background: #fff9ec;
}

.number {
    margin-top: 6px;
    font-size: 30px;
    font-weight: 800;
    color: #10284f;
}

.entity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.entity-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px;
    background: #fff;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.card-title {
    margin: 0;
    font-size: 19px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.meta-item {
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px;
}

.meta-label {
    display: block;
    color: #6a7688;
    font-size: 12px;
    margin-bottom: 4px;
}

.meta-value {
    font-weight: 700;
    color: #1f2f47;
}

.entity-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 9px;
    white-space: nowrap;
}

.badge-success {
    background: #e9f8f1;
    color: #156947;
    border: 1px solid #b8e4d4;
}

.badge-warning {
    background: #fff8e7;
    color: #8b5a0c;
    border: 1px solid #ecd4a5;
}

.badge-info {
    background: #eaf2ff;
    color: #174a96;
    border: 1px solid #bfd3f8;
}

.badge-muted {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #d7e1ec;
}

.table-wrap {
    overflow-x: auto;
}

.rides-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.rides-table th,
.rides-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.rides-table th {
    font-size: 13px;
    color: #4a5a70;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chart-bar {
    margin-top: 10px;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 700;
}

.chart-bar-progress {
    background: #e8eef8;
    border-radius: 999px;
    overflow: hidden;
    height: 13px;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2f67d8, #4591e6);
    color: #fff;
    font-size: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 6px;
}

.report-notes ul {
    margin: 8px 0 0 18px;
    color: #4c5a6d;
}

.no-data {
    background: #f8fafc;
    border: 1px dashed #ccd6e7;
    color: #58667c;
    border-radius: 10px;
    padding: 12px;
}

/* Modallar sadece is-visible iken görünür */
.modal {
    display: none;
}

.modal.is-visible {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 23, 39, 0.5);
}

.modal-panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid #cad6ea;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 18px;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.modal-close {
    border: 1px solid #ced7e6;
    background: #f2f5fa;
    color: #1f2f47;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    line-height: 1;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 960px) {
    .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .entity-grid {
        grid-template-columns: 1fr;
    }

    .meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 18px);
        margin-top: 10px;
    }

    .brand {
        font-size: 27px;
    }

    .hamburger {
        display: inline-block;
    }

    header nav,
    .topbar nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: min(260px, calc(100vw - 30px));
        border-radius: 12px;
        background: #183c7f;
        border: 1px solid rgba(255, 255, 255, 0.16);
        padding: 8px;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow);
    }

    header nav.active,
    .topbar nav.active {
        display: flex;
    }

    .quick-action-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .ongoing-ride-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .collapsible-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .report-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .modal.is-visible {
        align-items: flex-end;
        padding: 0;
    }

    .modal-panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 16px 14px 16px;
    }

    .modal-head {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
        padding-bottom: 12px;
        margin-bottom: 14px;
    }

    .modal-head h2 {
        font-size: 22px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    label {
        margin-bottom: 6px;
        font-size: 14px;
    }

    input,
    select,
    textarea {
        padding: 12px;
        font-size: 15px;
    }

    .form-group-span-2,
    .form-group-full {
        grid-column: auto;
    }

    .modal .button-group {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding-top: 12px;
        margin-top: 14px;
        border-top: 1px solid var(--border);
    }

    .btn,
    button,
    a.btn {
        padding: 12px 14px;
        font-size: 14px;
        min-height: 44px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        width: 100%;
        border-radius: 14px;
    }

    .login-simple {
        max-width: 100%;
    }

    .login-shell-simple {
        border-radius: 14px;
    }

    .login-hero {
        order: 2;
        padding: 18px 16px;
    }

    .login-hero h1 {
        font-size: 27px;
        margin-top: 10px;
        margin-bottom: 8px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .login-highlights {
        display: none;
    }

    .login-card {
        order: 1;
        padding: 22px 16px;
    }

    .login-card h2 {
        font-size: 24px;
    }

    .login-card-note {
        margin-bottom: 14px;
        font-size: 14px;
    }

    .login-form .form-group {
        margin-bottom: 12px;
    }

    .login-form input {
        padding: 13px 12px;
        font-size: 16px;
        border-radius: 12px;
    }

    .login-form .btn {
        min-height: 46px;
        font-size: 15px;
    }

    .login-footnote {
        font-size: 11px;
        margin-top: 10px;
    }
}

@media (max-width: 420px) {
    .login-page {
        padding: 10px;
    }

    .login-shell {
        border-radius: 12px;
    }

    .login-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .login-hero {
        padding: 14px;
    }

    .login-card {
        padding: 18px 14px;
    }

    .login-copyright {
        margin-top: 12px;
        font-size: 11px;
    }

    /* Modal optimizations for very small screens */
    .modal-panel {
        padding: 18px 14px 16px;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-head {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .modal-head h2 {
        font-size: 20px;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    /* Form optimizations for small screens */
    .form-group {
        margin-bottom: 18px;
    }

    .form-row {
        gap: 14px;
    }

    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 700;
        font-size: 15px;
        color: #273244;
    }

    input,
    select,
    textarea {
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #fff;
        color: var(--text);
        padding: 14px 12px;
        font-size: 16px;
        line-height: 1.4;
    }

    textarea {
        min-height: 80px;
        resize: vertical;
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: #6d92d3;
        box-shadow: 0 0 0 3px rgba(31, 76, 163, 0.15);
    }

    .button-group {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .btn,
    button,
    a.btn {
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px;
        line-height: 1.2;
    }

    .btn-block {
        width: 100%;
    }

    .modal .button-group {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding-top: 16px;
        margin-top: 20px;
        border-top: 1px solid var(--border);
    }
}
