/* =============================================
   style.css - Sistem RPS OBE
   ============================================= */

/* ===== GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    min-height: 90vh;
}

/* ===== HEADER ===== */
.app-header {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.app-header h1 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header h1 i {
    font-size: 28px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.15);
    padding: 8px 18px;
    border-radius: 25px;
}

.user-info .role-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #f6ad55;
    color: #1a202c;
}

.user-info .role-badge.admin { background: #fc8181; }
.user-info .role-badge.koordinator { background: #68d391; }
.user-info .role-badge.dosen { background: #63b3ed; }

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.4);
}

/* ===== LOGIN ===== */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
}

.login-box h2 {
    color: #1a365d;
    margin-bottom: 10px;
    text-align: center;
}

.login-box .subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.login-box input, .login-box select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-box input:focus, .login-box select:focus {
    border-color: #2b6cb0;
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2b6cb0 0%, #1a365d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.login-error {
    background: #fed7d7;
    color: #c53030;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    display: none;
    padding: 25px 30px 30px;
}

/* ===== NAVIGATION ===== */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.nav-tab {
    padding: 10px 22px;
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}

.nav-tab:hover {
    background: #f7fafc;
    color: #2b6cb0;
}

.nav-tab.active {
    color: #2b6cb0;
    background: #ebf8ff;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2b6cb0;
    border-radius: 3px 3px 0 0;
}

.nav-tab i {
    margin-right: 8px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1 1 calc(33.33% - 14px);
    min-width: 200px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
    font-size: 13px;
}

input, textarea, select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 13px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
}

input:focus, textarea:focus, select:focus {
    border-color: #2b6cb0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

textarea {
    resize: vertical;
    min-height: 50px;
}

.section-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #2b6cb0;
}

.section-card h3 {
    color: #1a365d;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card h3 i {
    color: #2b6cb0;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

th {
    background: #2b6cb0;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    vertical-align: top;
}

tr:nth-child(even) {
    background: #f7fafc;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary { background: #2b6cb0; color: white; }
.btn-primary:hover { background: #1a365d; }
.btn-success { background: #38a169; color: white; }
.btn-success:hover { background: #276749; }
.btn-danger { background: #e53e3e; color: white; }
.btn-danger:hover { background: #c53030; }
.btn-warning { background: #dd6b20; color: white; }
.btn-warning:hover { background: #c05621; }
.btn-outline {
    background: transparent;
    border: 2px solid #2b6cb0;
    color: #2b6cb0;
}
.btn-outline:hover {
    background: #2b6cb0;
    color: white;
}
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* ===== WEEK CARDS ===== */
.week-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 992px) {
    .week-grid {
        grid-template-columns: 1fr;
    }
}

.week-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s;
}

.week-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.week-card h4 {
    color: #2b6cb0;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== REPORT ===== */
.report-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.report-container h2 {
    color: #1a365d;
    text-align: center;
    border-bottom: 3px solid #2b6cb0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* ===== TEMPLATE OPTIONS ===== */
.template-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.template-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

.template-options label:hover {
    background: #f7fafc;
}

.template-options input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 2px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
}

.template-options input[type="text"] {
    width: 200px;
}

/* ===== RPS LIST ===== */
.rps-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.rps-list-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #2b6cb0;
}

.rps-list-item .rps-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rps-list-item .rps-info .rps-title {
    font-weight: 600;
    color: #1a365d;
}

.rps-list-item .rps-info .rps-meta {
    font-size: 12px;
    color: #718096;
}

.rps-list-item .rps-actions {
    display: flex;
    gap: 8px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: #38a169; }
.toast.error { background: #e53e3e; }
.toast.info { background: #2b6cb0; }

/* ===== DASHBOARD ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    border-left: 4px solid #2b6cb0;
}

.stat-card h3 {
    color: #1a365d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2b6cb0;
}

.stat-card .stat-number.green { color: #38a169; }
.stat-card .stat-number.orange { color: #dd6b20; }

/* ===== PRINT ===== */
@media print {
    .no-print { display: none !important; }
    body { background: white; padding: 0; }
    .container { box-shadow: none; border-radius: 0; }
    .app-header { background: #1a365d !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .section-card { background: #f8fafc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    th { background: #2b6cb0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-container { border: none; padding: 20px; }
    .main-content { padding: 15px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        text-align: center;
    }
    .form-row .form-group {
        flex: 1 1 100%;
    }
    .container {
        border-radius: 0;
    }
    .main-content {
        padding: 15px;
    }
    .week-grid {
        grid-template-columns: 1fr;
    }
    .login-box {
        padding: 30px 20px;
    }
    .template-options {
        flex-direction: column;
        align-items: stretch;
    }
    .template-options input[type="text"] {
        width: 100%;
    }
}