:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --border: #334155;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
}

header {
    height: 60px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-btns {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.tab-btn:hover {
    background-color: rgba(249, 115, 22, 0.1);
    border-color: var(--accent);
}

.tab-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.gps-btn {
    background-color: #0284c7;
    border-color: #0284c7;
    color: white;
}

.gps-btn:hover {
    background-color: #0369a1;
}

.logout-btn {
    background-color: #ef4444;
    border-color: #ef4444;
    color: white;
}

.logout-btn:hover {
    background-color: #dc2626;
}

.main-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: calc(100vh - 60px);
}

.view-section {
    display: none;
    width: 100%;
    height: 100%;
}

.view-section.active {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

#map-view.active {
    display: flex;
}

#map {
    flex: 1;
    height: 100%;
}

.info-panel {
    width: 420px;
    height: 100%;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border);
    border-top: none;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.admin-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    margin: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

#auth-view.active, #admin-view.active {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-main);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.auth-header-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--accent);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.auth-tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.save-btn {
    width: 100%;
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.save-btn:hover {
    background-color: var(--accent-hover);
}

.welcome-card, .section-box {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.tubitak-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.panel-logo-box {
    margin: 10px 0;
}

.action-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: block;
}

.section-box h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--accent);
}

.section-box p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.stop-nav-btn {
    background: #0284c7;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.fav-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.fav-btn:hover {
    background: var(--accent);
    color: white;
}

.weather-box, .calc-box {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 13px;
}

.calc-box h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-main);
}

.calc-box select {
    margin-bottom: 8px;
}

.calc-box button {
    background: var(--border);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.calc-result {
    margin-top: 8px;
    font-weight: 600;
    color: var(--accent);
}

.stop-item {
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.stop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
}

.remove-stop-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.add-stop-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}

.success-alert {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
}

.error-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
}

@media (max-width: 1024px), (pointer: coarse) {
    body, html {
        overflow: auto;
    }
    .main-container {
        flex-direction: column !important;
        height: auto !important;
        min-height: calc(100vh - 60px);
    }
    #map-view.active {
        flex-direction: column !important;
    }
    #map {
        width: 100% !important;
        height: 52vh !important;
        min-height: 320px !important;
    }
    .info-panel {
        width: 100% !important;
        height: auto !important;
        border-left: none !important;
        border-top: 1px solid var(--border);
        padding: 15px;
    }
}