/* /public/css/admin.css */

/* ========== BASE & UTILITIES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
    padding: 40px 20px;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #e50914;
    color: white;
    border-color: #e50914;
}

.btn-primary:hover {
    background-color: #ff0a16;
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.3);
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-ghost {
    background: none;
    border: 2px solid #999;
    color: #333;
}

.btn-ghost:hover {
    background-color: #ddd;
    border-color: #555;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

input[type="text"], 
input[type="password"], 
input[type="url"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: #e50914;
    outline: none;
    box-shadow: 0 0 5px rgba(229, 9, 20, 0.2);
}

.error-message {
    color: #e50914;
    font-size: 14px;
    padding: 8px 0;
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-row.three-col .form-group {
    flex: 1 1 30%;
}

/* ========== LOGIN SCREEN ========== */
#loginScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #141414;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header h1 {
    color: #e50914;
    font-size: 24px;
    margin-bottom: 5px;
}

/* ========== DASHBOARD SCREEN ========== */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.dashboard-main {
    /* Hanya satu kolom penuh untuk Match CRUD */
    display: grid; 
    grid-template-columns: 1fr;
    gap: 30px;
}

.stream-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stream-card.full-width {
    grid-column: 1 / -1; 
}

/* ========== MATCH TABLE STYLES ========== */
.match-management-card {
    padding: 25px;
}

.match-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.match-table th, .match-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.match-table th {
    background-color: #f7f7f7;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
}

/* ========== MODAL STYLES ========== */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* Jarak atas disesuaikan agar modal di tengah */
    padding: 30px;
    border-radius: 8px;
    width: 90%; 
    max-width: 750px; /* Lebar maksimum disesuaikan */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeInModal 0.3s;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #e50914;
    text-decoration: none;
    cursor: pointer;
}

/* ========== TOAST NOTIFICATION ========== */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    min-width: 250px;
}

#toast.show {
    opacity: 1;
    visibility: visible;
}

#toast.success { background-color: #4CAF50; }
#toast.error { background-color: #e50914; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .modal-content {
        margin: 10% auto; 
    }
}

@media (max-width: 768px) {
    .dashboard-header { flex-direction: column; text-align: center; gap: 15px; }
    .dashboard-main { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .modal-content {
        margin: 5% auto; 
        max-width: 95%;
    }
}