/* ---- Base ---- */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f3f5f7;
    color: #333;
    margin: 0;
}

/* ---- Layout ---- */
.site-header {
    background: #6A7F94; /* RAL 5014 */
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
    font-size: 14px;
}

.nav-links a:hover {
    text-decoration: underline;
}

.page {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
}

.page-title {
    margin-top: 0;
    color: #6A7F94;
}

/* ---- Cards / Panels ---- */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-left: 5px solid #6A7F94;
    margin-bottom: 20px;
}

/* ---- Forms ---- */
form {
    margin-top: 10px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #6A7F94;
    margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #6A7F94;
    outline: none;
    background: #fdfefe;
}

.form-group input:focus {
    border-color: #4f6070;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: #6A7F94;
    color: #fff;
}

.btn-primary:hover {
    background-color: #5b6e81;
}

.btn-secondary {
    background-color: transparent;
    color: #6A7F94;
    border: 1px solid #6A7F94;
}

.btn-secondary:hover {
    background-color: #e2e7ec;
}

/* ---- Flash messages ---- */
.flash-messages {
    margin-bottom: 15px;
}

.flash {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 6px;
}

.flash-info {
    background: #e3edf7;
    border: 1px solid #6A7F94;
    color: #284155;
}

.flash-success {
    background: #e4f4e7;
    border: 1px solid #4caf50;
    color: #256029;
}

.flash-warning {
    background: #fff8e1;
    border: 1px solid #ffb300;
    color: #8a6d1f;
}

.flash-danger {
    background: #ffebee;
    border: 1px solid #e53935;
    color: #b71c1c;
}

/* ---- Tables ---- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.table th,
.table td {
    border-bottom: 1px solid #dde2e7;
    padding: 8px;
    text-align: left;
}

.table th {
    background: #e3e7ec;
    color: #333;
}

/* ---- Small helpers ---- */
.text-muted {
    color: #777;
    font-size: 13px;
}

.link {
    color: #6A7F94;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* ---- Home tiles ---- */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.tile-link {
    text-decoration: none;
    color: inherit;
}

.tile {
    background: #ffffff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-top: 5px solid #6A7F94; /* RAL 5014 accent */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.tile-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #364554;
}

.tile-subtitle {
    margin: 0;
    font-size: 13px;
    color: #777;
}

/* Disabled tile */
.tile-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-top: 5px solid #b7c3cd; /* lighter version of RAL 5014 */
}

.tile-disabled:hover {
    transform: none;
    box-shadow: none;
}