:root {
    --sidebar-width: 200px;
    --header-height: 90px;
    --hs-color: #081320; /*Sidebar & top*/


    --bg-main: #0B1625;
    --bg-panel: #08131F;
    --bg-card: #152435;

    --text-main: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #8cafcc;

    --primary: #102e58;
    --accent-blue: #2563eb;
    --accent-blue-light: #3d87ff;

    --success: #28a745;
    --warning: goldenrod;
    --danger: #dc3545;

    --border: #313c4e;

    --radius: 12px;
    --radius-inner: 6px;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --transition: all 0.3s ease;
}

/* ========================= RESET ========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

a {
    text-decoration: none;
}

h1 {
    font-size: 1.7rem;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: normal;
}

p,
a {
    font-size: 0.9rem;
}

button {
    font-family: inherit;
}

.hidden {
    display: none !important;
}

/* ========================= SCROLLBAR ========================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-panel);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: var(--radius);
}

/* ========================= FORM ========================= */
form input,
form button,
form textarea {
    padding: 12px 14px;
    background: var(--bg-card);
    color: #f8fafc;
    border: 1px solid var(--text-secondary);
    border-radius: var(--radius);
    font-weight: 600;
    text-align: left;
    outline: none;
}

form input:hover,
form button:hover {
    border-color: var(--border-color);
}

.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

/* ========================= SETTINGS PAGE ========================= */
.success-message,
.error-message {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-weight: 600;
}

.success-message {
    background: rgba(40, 167, 69, 0.15);
    color: #4ddf7c;
}

.error-message {
    background: rgba(220, 53, 69, 0.15);
    color: #ff6b81;
}










/* ========================= MAIN LAYOUT ========================= */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dispatch-container {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) + 15px);
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    display: grid;
    grid-template-columns: 1.25fr 2fr;
    
    gap: 15px;
    height: 100vh;
}

@media (max-width: 1300px) {
    .dispatch-container {
        display: grid;
        grid-template-columns: auto;
    }
}

aside,
.task-grid-section {
    padding: 20px;
    overflow-y: auto;
}


.patrol-panel,
.task-grid-section,
.filter-panel {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}


.vehicle-type-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--bg-card);
    border-radius: 8px;
}


/* ========================= TOP SECTIONS ========================= */
.tops {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.tops button {
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    background: var(--primary);
    border-radius: var(--radius-inner);
    color: var(--accent-blue-light);
    font-weight: bold;
    transition: all 0.25s ease;
}

.tops button:hover {
    transform: translateY(-2px);
}



/* ========================= BUTTONS ========================= */
.btn {
    flex: 1;
    padding: 5px;
    border: none;
    border-radius: var(--radius-inner);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.edit {
    background: rgb(37, 99, 235, 0.25);
    color: var(--accent-blue);
}

.edit:hover {
    transform: translateY(-2px);
}

.delete {
    background: rgba(235, 21, 21, 0.25);
    color: var(--danger);
}

.delete:hover {
    transform: translateY(-2px);
}

.delete-task-btn {
    background: var(--success);
    color: var(--text-main);
}

.delete-task-btn:hover {
    transform: translateY(-2px);
}

.remove-officer-btn {
    color: white;
    border-color: var(--danger);
}

.unassign {
    flex: none;
    height: fit-content;
    padding: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--bg-card);
}

.unassign:hover {
    border: 1px solid rgba(220, 38, 38, 0.75);
}


/* Enheder */
.container {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) + 15px);
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
    height: 100vh;
}


.enhed-form,
.edit-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.enhed-form button {
    padding: 10px;
}

.color-box {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: var(--radius);
    margin-right: 10px;
    vertical-align: middle;
}

.type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.type-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--bg-panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);

}

.enhed-form .color,
.edit-form .color {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 30px;
    height: 35px;
    padding: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.enhed-form .color::-webkit-color-swatch,
.edit-form .color::-webkit-color-swatch {
    border-radius: 15px;
    border: none;
}

.delete-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius);
}

.save-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius);
}


/* LOGIN */
/* ========================= LOGIN PAGE ========================= */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(145deg, var(--bg-main), var(--bg-panel));
}

.login-box {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-panel));
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 5px 20px var(--primary);
}

.login-box .sidebar-logo {
    align-self: center;
    text-align: center;
    margin-bottom: 10px;
}

.login-box input {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-panel);
    color: white;
}

.login-box input:focus,
.login-box input:active,
.login-box input:hover {
    outline: none;
    border-color: var(--accent-blue);
}

.login-box button {
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--accent-blue);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.login-box button:hover {
    background: var(--accent-blue-light);
}

.error {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}


input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-panel) inset !important;
  -webkit-text-fill-color: white !important;
  -webkit-border: var(--border) !important;
}