﻿/* Stylish dropdown for entity-select (department dropdown) */
.entity-select {
    width: 100%;
    max-width: 350px;
    padding: 0.75em 1em;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 1.05em;
    color: #28527a;
    box-shadow: 0 1px 4px rgba(60, 124, 177, 0.08);
    margin-bottom: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.entity-select:focus {
    border-color: #3e7cb1;
    box-shadow: 0 2px 8px rgba(60, 124, 177, 0.12);
    outline: none;
}
.entity-select option {
    color: #2d3e50;
    background: #fff;
    font-size: 1em;
    padding: 0.5em 1em;
}
/* Request header row for new_request page */
.request-header-row {
    display: flex;
    gap: 1em;
    align-items: flex-end;
    margin-bottom: 1em;
}
.request-header-citizen {
    flex: 75%;
}
.request-header-date {
    flex: 25%;
}
.request-date-input {
    padding: 0.75rem;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 75px;
    max-width: 100px;
}
.citizen-search {
    padding: 0.75rem;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 1rem;
    width: 75%;
}
.entity-table {
    min-width: 100%;
    font-size: 0.95rem;
    border-collapse: collapse;
    background: #f8fafc;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5em;
    table-layout: fixed;
    overflow-x: auto;
    white-space: nowrap;
}

.entity-thead {
    background: #d8dee9;
}

.entity-thead th {
    padding: 0.7em 0.5em;
    text-align: center;
    align-items: center;
    font-size: 1em;
    font-weight: bold;
    color: #222;
    overflow-x: hidden;
}

.entity-tbody tr {
    background: #eceff4;
    border-bottom: 1px solid #d8dee9;
    text-align: left;
}

.entity-tbody tr:last-child {
    border-bottom: none;
}

.entity-tbody td {
    padding: 0.7em 0.5em;
    font-size: 0.95em;
    color: #2d3e50;
    vertical-align: middle;
    word-break: break-word;
    text-align: center;
    align-items: center;
}



/* Requests list as table */
.request-lines-table-wrapper {
    width: 100%;
    overflow-x: auto;
}
.requests-table-header {
    display: flex;
    font-weight: bold;
    color: #222;
    background: #f0f4f8;
    border-radius: 6px 6px 0 0;
    padding: 0.7em 1.2em;
    margin-bottom: 0.2em;
    gap: 1em;
}

.requests-table-header span {
    flex: 1;
    text-align: left;
}

.entity-list {
    margin-top: 0;
}

.request-row {
    display: flex;
    gap: 1em;
    align-items: center;
    padding: 0.7em 1.2em;
    background: #f8fafc;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 0.5em;
    font-size: 0.9rem;
}

.request-row .entity-id,
.request-row .entity-name,
.request-row .entity-key {
    flex: 1;
    text-align: left;
    font-weight: 400;
    color: #2d3e50;
}

.request-row .status-cell {
    flex: 1;
    text-align: left;
    border: 1px solid #cfd8dc;
    border-radius: 3px;
}
.status-select {
    border: 1px solid #cfd8dc;
    border-radius: 3px;
}

.request-row select {
    width: 100%;
    min-width: 80px;
    font-size: 1em;
    padding: 0.2em 0.5em;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    background: #fff;
}

#deleteRequestForm {
    display: flex;
    justify-content: center;
    align-items: center;
}

.request-actions-row .action-btn-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.request-actions-row form {
    flex-grow: 1;
    width: auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.details-btn:disabled,
.delete-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.details-btn:hover {
    background: none !important;
}

/* Request actions row for buttons */
.request-actions-row {
    display: flex;
    gap: 0.5em;
    max-width: inherit;
    margin-bottom: 1.2em;
}

.request-actions-row button {
    width: 50%;
    min-width: 0;
    box-sizing: border-box;
}

/* Request details box */
#request-details-box {
    background: #f8fafc;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(60, 124, 177, 0.08);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    max-width: inherit;
    display: none;
    text-align: left;
}

#request-details-box.active {
    display: block;
}

#request-details-row {
    display: flex;
    gap: 2em;
    align-items: center;
    font-size: 0.9rem;
}

#request-details-id {
    font-weight: 500;
    color: #2d3e50;
}

#request-details-citizen {
    font-weight: 500;
    color: #2d3e50;
}

#request-details-date {
    font-weight: 500;
    color: #2d3e50;
}

/* Selection box */
.selection-box {
    padding: 1rem;
    background: #d8dee9;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.permission-list,
.status-list,
.user-list,
.citizen-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

/* Users stylish list */
.users-container {
    max-width: 600px;
}

.permission-item,
.status-item,
.user-item,
.citizen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.edit-btn {
    background: none;
    color: #3e7cb1;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: inherit;
    cursor: pointer;
    display: inline;
    transition: none;
    justify-content: center;
    align-items: center;
}

.edit-btn svg {
    stroke: #3e7cb1;
}

.edit-btn:hover svg {
    filter: brightness(1.2);
}

.edit-btn:hover {
    background: none;
}

/* Details button (document icon) */
.details-btn {
    background: none;
    color: #3e7cb1;
    border: none;
    border-radius: 0;
    padding: 0;
}

.details-btn svg {
    stroke: #3e7cb1;
}

.details-btn:hover svg {
    filter: brightness(1.2);
}

/* Search bar for citizens */
.search-bar {
    width: 100%;
    padding: 0.7rem 1rem;
    margin: 1rem 0 1.5rem 0;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Back button */
.back-btn {
    display: inline-block;
    position: fixed;
    top: 0.7rem;
    left: 1.2rem;
    z-index: 1100;
    margin-bottom: 0;
    color: #3e7cb1;
    background: none;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #28527a;
    text-decoration: underline;
}

/* Citizens stylish list and modal */
.citizens-container {
    max-width: 600px;
}

.delete-btn {
    background: none;
    color: #c0392b;
    border: none;
    border-radius: 0;
    padding: 0;
}

.delete-btn svg {
    stroke: #c0392b;
}

.delete-btn:hover svg {
    filter: brightness(1.2);
}

.delete-btn:hover {
    background: none !important;
}

.create-btn {
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background 0.2s;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    min-width: 320px;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
}

.citizen-form input[type="text"],
.citizen-form input[type="date"] {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 1rem;
}

.citizen-form button {
    width: 100%;
}

/* Topbar for user info and logout */
.topbar {
    width: 100%;
    height: 35px;
    background: #76241C;
    padding: 0.5rem 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    position: fixed;
    top: 0;
    z-index: 1200;
}

.user-info {
    color: #fff;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    color: #76241C;
    background: #fff;
    border: solid 1px none;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    transition: color 0.2s;
}

.logout-btn:hover {
    background: #a93226;
    color: #fff;
    border: solid 1px none;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #eceff4;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem 2.5rem;
}

h1 {
    color: #2d3e50;
    text-align: center;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    padding: 0.75rem;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 1rem;
}

button {
    background: #76241C;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    vertical-align: -webkit-baseline-middle;
}

button:hover {
    background: rgba(118, 36, 28, 0.9);
}

.error {
    color: #c0392b;
    background: #fbeee6;
    border: 1px solid #e17055;
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0.5em 0;
    border-radius: 6px;
}

nav li:hover {
    background: #e5e9f0;
}

nav .menu-section {
    font-weight: 500;
    font-size: 1.05em;
    margin: 0.25em 0 0 0;
}
nav .menu-section:hover {
    background: none;
    cursor: default;
}

nav a {
    color: #000;
    text-decoration: none;
    font-size: 1.05em;
    padding: 0.3em 0.7em;
    display: block;
    border-radius: 6px;
    transition: background 0.2s;
}

.content-container p {
    text-align: center;
    color: #555;
}

/* Consolidated list styles for all entity lists */
.entity-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.entity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.entity-item:last-child {
    border-bottom: none;
}

.entity-name {
    font-weight: bold;
    font-size: 1.1em;
}

.entity-key {
    color: #888;
    margin-left: 0.5em;
}

.requests-filters-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.request-row {
    flex-wrap: nowrap !important;
}

.selected-request {
    background: #e0e7ef;
    /* 10% darker than #f8fafc */
    box-shadow: 0 2px 8px rgba(60, 124, 177, 0.12);
    border: 2px solid #3e7cb1;
}

.burger-menu-wrapper {
    position: fixed;
    left: 1.2rem;
}

.burger-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3em;
    transition: background 0.2s;
}

.burger-menu-btn:focus {
    outline: none
}

.burger-menu-btn:hover {
    background: none;
}

.burger-menu-dropdown {
    position: absolute;
    top: 46px;
    left: 0;
    background: #d8dee9;
    border: 1px solid #cfd8dc;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 12px rgba(60, 124, 177, 0.10);
    min-width: 190px;
    padding: 0.5em 0.5em;
    z-index: 1100;
}

.burger-menu-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.burger-menu-dropdown li {
    margin: 0.5em 0;
    border-radius: 6px;
}

.burger-menu-dropdown li:hover {
    background: #e5e9f0;
}

.burger-menu-dropdown .menu-section {
    font-weight: 500;
    font-size: 1.05em;
    margin: 0.25em 0 0 0;
}
.burger-menu-dropdown .menu-section:hover {
    background: none;
    cursor: default;
}

.burger-menu-dropdown a {
    color: #000;
    text-decoration: none;
    font-size: 1.05em;
    padding: 0.3em 0.7em;
    display: block;
    border-radius: 6px;
    transition: background 0.2s;
}

.citizen-combobox {
    z-index: 100;
    position: relative;
}

.citizen-dropdown {
    position: absolute;
    top: 2.8em;
    left: 0;
    background: #fff;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(60, 124, 177, 0.08);
    max-height: 180px;
    width: 81%;
    overflow-y: auto;
    z-index: 1500;
    display: none;
}

.login-container {
    margin: 10px 50px;
}

.login-logo {
    max-width: 256px;
    height: 124px;
    margin-bottom: 1.5rem;
}

.login-header h1 {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.login-container button {
    align-self: flex-end;
    min-width: 108px;
}

/* Mobile styles */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 1rem 0.5rem;
    }

    .entity-thead th {
    font-size: 0.9em;
    }

    .entity-tbody td {
        font-size: 0.9em;
    }
}

@media (min-width: 576px) and (max-width: 1199px) {
    .container {
        max-width: 100%;
        padding: 1rem 0.5rem;
    }

    .entity-thead th {
        font-size: 0.9em;
    }

    .entity-tbody td {
        font-size: 0.9em;
    }
}

/* Large desktop styles */
@media (min-width: 1200px) {
    .container {
        max-width: 1100px;
        padding: 2.5rem 3.5rem;
    }
}