/* assets/css/style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header / Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.navbar h1 { font-size: 22px; }
.navbar .nav-links { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background 0.2s;
}
.navbar a:hover, .navbar a.active { background: rgba(255,255,255,0.2); }
.navbar .user-info { font-size: 14px; }
.navbar .badge {
    background: rgba(255,255,255,0.25);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.card-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.card-header h2 { color: #444; font-size: 20px; }

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
}
.stat-card .label { color: #888; font-size: 13px; text-transform: uppercase; }
.stat-card .value { font-size: 28px; font-weight: bold; color: #333; margin-top: 5px; }
.stat-card.green { border-left-color: #28a745; }
.stat-card.orange { border-left-color: #ff9800; }
.stat-card.red { border-left-color: #dc3545; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: #555; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}
.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5568d3; }
.btn-success { background: #28a745; color: white; }
.btn-success:hover { background: #218838; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }
.btn-warning { background: #ff9800; color: white; }
.btn-warning:hover { background: #e68900; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
}
table tr:hover { background: #f9fafb; }
table td .actions { display: flex; gap: 5px; }

/* Alerts */
.alert { padding: 12px 15px; border-radius: 4px; margin-bottom: 15px; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error, .alert-danger { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }

/* Badges */
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-penuh { background: #f8d7da; color: #721c24; }
.badge-tersedia { background: #d4edda; color: #155724; }
.badge-hampir { background: #fff3cd; color: #856404; }
.badge-role-superadmin { background: #667eea; color: white; padding: 3px 8px; border-radius: 4px; font-size: 11px; }
.badge-role-admin { background: #6c757d; color: white; padding: 3px 8px; border-radius: 4px; font-size: 11px; }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}
.login-box h2 { text-align: center; margin-bottom: 25px; color: #333; }
.login-box .form-group input { padding: 12px; }
.login-box .btn { width: 100%; padding: 12px; font-size: 15px; }

/* Dashboard Public */
.public-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}
.public-header h1 { font-size: 32px; margin-bottom: 10px; }
.public-header p { opacity: 0.9; }
.public-header .login-link {
    display: inline-block;
    margin-top: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
}
.public-header .login-link:hover { background: rgba(255,255,255,0.3); }

/* Filter section */
.filter-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Room Status Cards */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.room-card {
    background: white;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border-top: 4px solid #28a745;
}
.room-card.penuh { border-top-color: #dc3545; }
.room-card.hampir { border-top-color: #ff9800; }
.room-card h3 { font-size: 22px; color: #333; }
.room-card .info { font-size: 13px; color: #666; margin: 5px 0; }
.room-card .occupancy {
    background: #eee;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.room-card .occupancy-bar {
    height: 100%;
    background: #28a745;
    transition: width 0.3s;
}
.room-card.penuh .occupancy-bar { background: #dc3545; }
.room-card.hampir .occupancy-bar { background: #ff9800; }

/* Responsive */
@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: flex-start; }
    .navbar .nav-links { margin-top: 10px; width: 100%; }
    .container { padding: 10px; }
    .card { padding: 15px; }
    table th, table td { padding: 8px; font-size: 13px; }
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 13px;
    margin-top: 30px;
}
