* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: #1e3c28 url('mokki.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #222;
    min-height: 100vh;
}

.overlay {
    background: rgba(15, 25, 35, 0.45);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 1.5rem;
    color: #1e4620;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.login-card {
    max-width: 400px;
    margin: 50px auto;
}

.admin-panel {
    border-top: 5px solid #2c5e3b;
}

h2 {
    margin-bottom: 15px;
    color: #1e4620;
    font-size: 1.25rem;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: #333;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    width: auto !important;
}

.btn-primary {
    background: #2c5e3b;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #1e4620;
}

.btn-secondary {
    background: #3b6998;
    color: white;
    width: 100%;
}

.btn-danger {
    background: #c0392b;
    color: white;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Kalenterin ruudukko ja värit */
.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cal-header h2 {
    margin: 0;
}

.cal-hint {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day-name {
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
    background: #1e4620;
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
}

.cal-cell {
    min-height: 70px;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.9rem;
    border: 1px solid #ddd;
}

.cal-cell.empty {
    background: transparent;
    border: none;
}

.cal-cell.past {
    background: #f2f2f2;
    color: #999;
}

.cal-cell.free {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #1b5e20;
    cursor: pointer;
    transition: transform 0.1s, background 0.1s;
}

.cal-cell.free:hover {
    background: #c8e6c9;
    transform: scale(1.03);
}

.cal-cell.booked {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #b71c1c;
}

.cal-cell span {
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Taulukko */
.table-responsive {
    overflow-x: auto;
}

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

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

th {
    background-color: #f4f6f4;
    color: #1e4620;
}

/* Mobiilinäkymä */
@media (max-width: 768px) {
    .overlay {
        padding: 10px;
    }
    .card {
        padding: 15px 10px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .cal-header h2 {
        font-size: 1.05rem;
    }
    .cal-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 3px;
    }
    .cal-day-name {
        padding: 6px 0;
        font-size: 0.75rem;
    }
    .cal-cell {
        min-height: 44px;
        padding: 3px 2px;
        font-size: 0.75rem;
        align-items: center;
        text-align: center;
    }
    .cal-cell span {
        font-size: 0.6rem;
        max-width: 100%;
    }
}

