/* auth.css - Styles untuk sistem autentikasi */

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
}

/* Login Form Styles */
.login-form {
    margin-bottom: 20px;
}

.login-form .form-group {
    margin-bottom: 15px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--secondary);
}

.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.login-form input:focus {
    border-color: var(--primary);
    outline: none;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-login {
    flex: 2;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.btn-login:hover {
    background-color: var(--secondary);
}

.btn-cancel {
    flex: 1;
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-cancel:hover {
    background-color: #545b62;
}

/* Demo Accounts */
.demo-accounts {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid var(--accent);
}

.demo-accounts h4 {
    margin: 0 0 10px 0;
    color: var(--secondary);
    font-size: 0.9rem;
}

.demo-accounts p {
    margin: 5px 0;
    font-size: 0.8rem;
    color: #666;
}

/* Restricted Tab Styles */
.tab.restricted {
    position: relative;
    opacity: 0.7;
}

.tab.restricted::after {
    content: '🔒';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
}

/* User Info Styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.btn-logout {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 10px;
}

.btn-logout:hover {
    background-color: #c82333;
}

.role-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: normal;
}

.role-badge.guru {
    background-color: var(--vii);
    color: white;
}

.role-badge.admin {
    background-color: var(--ix);
    color: white;
}

/* Auth Messages */
.auth-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.auth-message.success {
    background-color: #28a745;
}

.auth-message.error {
    background-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .auth-message {
        left: 20px;
        right: 20px;
        text-align: center;
    }
}