:root {
    --primary: #337ab7;
    --success: #5cb85c;
    --warning: #f0ad4e;
    --danger: #d9534f;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: #f4f6f8;
    color: #333;
}

header {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}

header a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    padding: 20px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: var(--primary);
}

.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); }
.btn-danger { background: var(--danger); }
.btn-secondary { background: #777; }

form label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

form input, form select, form button {
    padding: 8px;
    width: 100%;
    max-width: 400px;
    margin-top: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

table th {
    background: #eee;
}

.error { color: var(--danger); }
.success { color: var(--success); }

#calendar {
    margin-top: 15px;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.close {
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

.fc-event {
    cursor: pointer;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tile {
    display: block;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: transform .15s ease, box-shadow .15s ease;
    border-left: 4px solid var(--primary);
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.tile-icon {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
}

.tile-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tile-desc {
    font-size: 14px;
    color: #666;
}

.tile-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-left-color: #ccc;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/logo.png') no-repeat center center;
    background-size: 700px auto;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}
