/**
 * Main Stylesheet
 * Ruang BGTK NTB
 */

/* ============================================
   GENERAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header h1 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    margin: 0;
}

.content-section {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.navbar {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 20px;
    font-weight: bold;
    color: white !important;
    text-decoration: none !important;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.navbar-menu a {
    color: white !important;
    text-decoration: none !important;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.navbar-menu a:hover {
    background: rgba(255,255,255,0.2);
}

/* ============================================
   FORMS
   ============================================ */

.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 18px;
}

.section-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control-file {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    background: #fafafa;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* ============================================
   DYNAMIC REPEATER (KEGIATAN)
   ============================================ */

.kegiatan-row {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
}

.kegiatan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

.kegiatan-header h4 {
    color: var(--primary-color);
    margin: 0;
}

.btn-remove-kegiatan {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-remove-kegiatan:hover {
    background: #c82333;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

/* ============================================
   TABLES
   ============================================ */

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table thead {
    background: var(--light-color);
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr:hover {
    background: #f9f9f9;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

.badge-info {
    background: var(--info-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
}

/* ============================================
   LOGIN PAGE (Default)
   ============================================ */

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 28px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 12px;
    color: #666;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-actions {
    margin-bottom: 30px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

.surat-tugas-info {
    background: var(--light-color);
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.surat-tugas-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* ============================================
   UTILITIES
   ============================================ */

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .navbar-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}

/* ============================================
   ICONS (Simple CSS Icons)
   ============================================ */

.icon-plus::before {
    content: '+ ';
}

.icon-save::before {
    content: '💾 ';
}

.icon-trash::before {
    content: '🗑️ ';
}

.icon-download::before {
    content: '⬇️ ';
}

.icon-view::before {
    content: '👁️ ';
}

.icon-edit::before {
    content: '✏️ ';
}

.icon-logout::before {
    content: '🚪 ';
}

/* ============================================
   LOGIN STYLE KEMDIKBUD (NEW)
   ============================================ */

.login-page-kemdikbud {
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: 0;
}

/* Gradient Waves Animation */
.gradient-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    opacity: 0.3;
    border-radius: 40%;
}

.wave1 {
    background: linear-gradient(45deg, rgba(66, 134, 244, 0.4), rgba(103, 58, 183, 0.4));
    top: -50%;
    left: -50%;
    animation: waveAnimation1 20s ease-in-out infinite;
}

.wave2 {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(233, 30, 99, 0.3));
    top: -30%;
    left: -30%;
    animation: waveAnimation2 15s ease-in-out infinite;
}

.wave3 {
    background: linear-gradient(225deg, rgba(63, 81, 181, 0.2), rgba(0, 188, 212, 0.2));
    top: -70%;
    left: -70%;
    animation: waveAnimation3 25s ease-in-out infinite;
}

@keyframes waveAnimation1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(5%, 5%) rotate(90deg);
    }
    50% {
        transform: translate(-5%, 5%) rotate(180deg);
    }
    75% {
        transform: translate(-5%, -5%) rotate(270deg);
    }
}

@keyframes waveAnimation2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(-10%, 10%) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(10%, -10%) rotate(240deg) scale(0.9);
    }
}

@keyframes waveAnimation3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(10%, -10%) rotate(180deg);
    }
}

/* Floating Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particles span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: floatParticles 25s linear infinite;
    bottom: -150px;
}

.particles span:nth-child(1) {
    left: 10%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
    animation-duration: 20s;
}

.particles span:nth-child(2) {
    left: 20%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 15s;
}

.particles span:nth-child(3) {
    left: 30%;
    width: 40px;
    height: 40px;
    animation-delay: 4s;
}

.particles span:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.particles span:nth-child(5) {
    left: 50%;
    width: 30px;
    height: 30px;
    animation-delay: 8s;
}

.particles span:nth-child(6) {
    left: 60%;
    width: 50px;
    height: 50px;
    animation-delay: 3s;
    animation-duration: 22s;
}

.particles span:nth-child(7) {
    left: 70%;
    width: 35px;
    height: 35px;
    animation-delay: 7s;
}

.particles span:nth-child(8) {
    left: 80%;
    width: 45px;
    height: 45px;
    animation-delay: 15s;
    animation-duration: 30s;
}

.particles span:nth-child(9) {
    left: 85%;
    width: 25px;
    height: 25px;
    animation-delay: 2s;
    animation-duration: 17s;
}

.particles span:nth-child(10) {
    left: 90%;
    width: 70px;
    height: 70px;
    animation-delay: 11s;
}

@keyframes floatParticles {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Login Content Overlay */
.login-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    margin-top: 30px;
    text-align: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
}

.logo-container {
    margin-bottom: 15px;
    animation: fadeInDown 0.8s ease;
}

.main-logo {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.app-title {
    font-size: 26px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: fadeInDown 0.8s ease 0.2s both;
}

.app-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    animation: fadeInDown 0.8s ease 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-instruction {
    text-align: left;
    color: #333;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 400;
}

.login-form-kemdikbud {
    width: 100%;
}

.input-group-kemdikbud {
    margin-bottom: 25px;
    text-align: left;
}

.input-group-kemdikbud label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: none;
    border-bottom: 2px solid #ddd;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    border-radius: 0;
    background: transparent;
    color: #333;
}

.input-wrapper input::placeholder {
    color: #aaa;
}

.input-wrapper input:focus {
    border-bottom: 2px solid #2196F3;
}

.input-wrapper .input-icon-left {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    pointer-events: none;
    font-size: 22px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    cursor: pointer;
    font-size: 22px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #2196F3;
}

.btn-masuk {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 25px;
    text-transform: capitalize;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    letter-spacing: 0.5px;
}

.btn-masuk:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

.btn-masuk:active {
    transform: translateY(0);
}

.forgot-password {
    text-align: right;
    margin-top: 15px;
}

.forgot-password a {
    color: #2196F3;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: #1976D2;
    text-decoration: underline;
}

.login-footer-kemdikbud {
    margin-top: auto;
    padding: 30px 20px 20px;
    text-align: center;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.login-footer-kemdikbud h4 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.login-footer-kemdikbud p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    margin: 4px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.login-footer-kemdikbud p strong {
    font-weight: 500;
}

.login-footer-kemdikbud .address {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 5px;
}

.login-card {
    animation: fadeInUp 0.8s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger-kemdikbud {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
    border-left: 4px solid #c62828;
    animation: shake 0.5s ease;
}

.alert-danger-kemdikbud .material-icons {
    margin-right: 10px;
    font-size: 22px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-wrapper {
        max-width: 100%;
        margin-top: 20px;
    }
    
    .login-card {
        padding: 30px 25px;
    }
    
    .app-title {
        font-size: 22px;
    }
    
    .app-subtitle {
        font-size: 13px;
    }
    
    .main-logo {
        width: 90px;
    }
}
