* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #f4f6f9;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box {
    width: 350px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 25px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    border: none;
    background: #1e3a8a;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.hata {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.panel {
    display: flex;
    min-height: 100vh;
}

aside {
    width: 250px;
    background: #0f172a;
    color: white;
    padding: 25px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

aside h2 {
    margin-bottom: 30px;
    font-size: 24px;
    text-align: center;
}

aside a {
    display: block;
    color: #e5e7eb;
    text-decoration: none;
    padding: 13px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: 0.2s;
}

aside a:hover {
    background: #1e293b;
    color: white;
}

main {
    flex: 1;
    padding: 35px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    padding: 25px;
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 25px rgba(37,99,235,0.18);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-4px);
}

.card-title {
    display: block;
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.card strong {
    display: block;
    font-size: 38px;
    font-weight: bold;
}

.form-box,
.table-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.form-box form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-box input {
    padding: 11px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.form-box button {
    padding: 11px 20px;
    border: none;
    background: #1e3a8a;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

table th {
    background: #f9fafb;
}

.aktif {
    color: #15803d;
    font-weight: bold;
}

.pasif {
    color: #b91c1c;
    font-weight: bold;
}

.sil-btn {
    background: #dc2626;
    color: white;
    padding: 7px 12px;
    border-radius: 6px;
    text-decoration: none;
}

.form-box select {
    padding: 11px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.duzenle-btn {
    background: #2563eb;
    color: white;
    padding: 7px 12px;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 5px;
}

.iptal-btn {
    background: #6b7280;
    color: white;
    padding: 11px 16px;
    border-radius: 8px;
    text-decoration: none;
}

.arama-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.arama-form input {
    padding: 11px;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 250px;
}

.arama-form button {
    padding: 11px 20px;
    border: none;
    background: #1e3a8a;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

canvas {
    max-width: 100%;
    margin-top: 15px;
}

@media (max-width: 1100px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .panel {
        flex-direction: column;
    }

    aside {
        width: 100%;
        height: auto;
        position: relative;
    }

    aside h2 {
        text-align: left;
    }

    aside a {
        display: inline-block;
        margin-right: 6px;
    }

    main {
        padding: 20px;
    }

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

    .form-box form {
        flex-direction: column;
    }

    .form-box input,
    .form-box select,
    .form-box button {
        width: 100%;
    }

    .arama-form {
        flex-direction: column;
    }

    .arama-form input,
    .arama-form button,
    .arama-form a {
        width: 100%;
    }

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

    table {
        min-width: 800px;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #16a34a;
    color: white;
    padding: 14px 22px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(-15px);
    transition: 0.3s;
    z-index: 9999;
}

.toast.goster {
    opacity: 1;
    transform: translateY(0);
}

.toast.hata {
    background: #dc2626;
}

.toast.uyari {
    background: #f59e0b;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.modal-overlay.aktif {
    display: flex;
}

.modal-box {
    background: white;
    width: 380px;
    max-width: 90%;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    text-align: center;
}

.modal-box h3 {
    margin-bottom: 10px;
}

.modal-box p {
    color: #6b7280;
    margin-bottom: 22px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-cancel {
    background: #6b7280;
    color: white;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.modal-delete {
    background: #dc2626;
    color: white;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    cursor: pointer;
}

td .aktif,
td .pasif {
    margin-left: 6px;
}

.gunler-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.gunler-box label {
    background: #f3f4f6;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.uyari-yazi {
    color: #d97706;
    font-weight: bold;
}

.ust-islemler {
    margin-bottom: 20px;
}

@media print {
    aside,
    .ust-islemler,
    .iptal-btn,
    script {
        display: none !important;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        height: auto !important;
        overflow: visible !important;
    }

    .panel {
        display: block !important;
        min-height: auto !important;
        height: auto !important;
    }

    main {
        padding: 10px !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .table-box {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 10px !important;
        page-break-inside: avoid;
    }

    table {
        width: 100% !important;
        min-width: unset !important;
        font-size: 12px;
    }

    h1, h2, h3, p {
        margin-top: 0;
    }
}

.menu-badge{
    display:block;
    font-size:11px;
    color:#94a3b8;
    margin-top:2px;
}

.card strong {
    word-break: break-word;
}

.card-link {
    text-decoration: none;
}

.dashboard-actions{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-bottom:25px;
}

.action-card{
    background:white;
    padding:24px;
    border-radius:16px;
    text-decoration:none;
    color:#111827;
    box-shadow:0 2px 12px rgba(0,0,0,0.08);
    transition:0.2s;
}

.action-card:hover{
    transform:translateY(-4px);
}

.action-card h3{
    margin-bottom:10px;
    color:#2563eb;
}

.action-card p{
    color:#64748b;
    line-height:1.6;
}

.gps-layout{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:24px;
}

.gps-map,
.gps-info-card{
    background:white;
    border-radius:18px;
    padding:22px;
    box-shadow:0 2px 12px rgba(0,0,0,0.08);
}

.gps-topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.gps-badge{
    background:#dbeafe;
    color:#2563eb;
    padding:8px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
}

.gps-side{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.gps-info-card p{
    margin:15px 0;
    color:#64748b;
    line-height:1.7;
}

.gps-info-card ul{
    padding-left:18px;
    line-height:2;
}

.gps-status{
    margin-top:15px;
    background:#eff6ff;
    color:#2563eb;
    padding:18px;
    border-radius:12px;
    font-weight:600;
}

@media(max-width:900px){

    .gps-layout{
        grid-template-columns:1fr;
    }

}

.fake-map {
    position: relative;
    width: 100%;
    height: 340px;
    min-height: 340px;
    border-radius: 18px;
    overflow: hidden;
    margin-top: 15px;
    background:
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)),
        url("https://tile.openstreetmap.org/10/549/374.png");
    background-size: cover;
    background-position: center;
    border: 1px solid #e5e7eb;
}

.map-point {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #2563eb;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(37,99,235,0.18);
    animation: pulse 2s infinite;
}

.map-point span {
    position: absolute;
    top: 25px;
    left: -25px;
    background: #111827;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
}

.point-1 {
    top: 80px;
    left: 160px;
}

.point-2 {
    top: 190px;
    left: 430px;
}

.point-3 {
    top: 120px;
    right: 160px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37,99,235,0.35);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(37,99,235,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37,99,235,0);
    }
}



/* Mobil Uyum */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    .panel {
        flex-direction: column;
    }

    aside {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px;
    }

    aside h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    aside a {
        display: inline-block;
        padding: 9px 12px;
        font-size: 14px;
        margin: 4px;
    }

    main {
        padding: 16px;
    }

    main h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card {
        padding: 18px;
    }

    .card strong {
        font-size: 28px;
    }

    .dashboard-actions {
        grid-template-columns: 1fr;
    }

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

    .form-box,
    .table-box,
    .gps-map,
    .gps-info-card {
        padding: 16px;
        border-radius: 14px;
    }

    .form-box form {
        flex-direction: column;
    }

    .form-box input,
    .form-box select,
    .form-box button,
    .form-box textarea {
        width: 100%;
    }

    .arama-form {
        flex-direction: column;
    }

    .arama-form input,
    .arama-form button,
    .arama-form a {
        width: 100%;
        text-align: center;
    }

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

    table {
        min-width: 850px;
        font-size: 13px;
    }

    table th,
    table td {
        padding: 9px;
    }

    .duzenle-btn,
    .sil-btn,
    .iptal-btn {
        display: inline-block;
        margin-bottom: 5px;
        font-size: 13px;
        padding: 7px 10px;
    }

    .modal-box {
        width: 92%;
        padding: 20px;
    }

    .gps-layout {
        grid-template-columns: 1fr;
    }

    .gps-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .fake-map {
        height: 260px;
    }

    .point-1 {
        top: 60px;
        left: 70px;
    }

    .point-2 {
        top: 160px;
        left: 180px;
    }

    .point-3 {
        top: 100px;
        right: 70px;
    }
}