@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

/* === GLOBAL BODY === */
body {
    background: #0f172a;
    color: #fff;
    min-height: 100vh;
}

/* === LOGIN & REGISTER === */
body.auth {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a;
}

.container {
    margin: 0 15px;
}

.form-box {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.form-box h2 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

.form-box input {
    width: 100%;
    padding: 12px;
    background: #374151;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    color: #fff;
    margin-bottom: 15px;
}

.form-box input::placeholder {
    color: #9ca3af;
}

.form-box button {
    width: 100%;
    padding: 12px;
    background: #22c55e;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 15px;
    transition: 0.3s;

    display: flex;               /* gunakan flex */
    align-items: center;         /* ratakan vertikal */
    justify-content: center; 
}

.form-box button:hover {
    background: #16a34a;
}

.form-box p {
    font-size: 13px;
    text-align: center;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.form-box p a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
}

.form-box p a:hover {
    text-decoration: underline;
}

/* === DASHBOARD === */

/* Header */
header {
    background: #111827;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

header .title {
    font-size: 16px;
    font-weight: 600;
}

header .profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

header .username {
    background: #374151;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

header .logout {
    background: #ef4444;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.3s;
}

header .logout:hover {
    background: #dc2626;
}

/* Tabs Menu */
.tabs {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    background: #111827;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    background: #1f2937;
    transition: 0.3s;
    text-decoration: none; /* Hilangkan underline */
    color: #fff;           /* Warna teks default */
    display: block; 
}

.tab.active {
    background: #22c55e;
    color: #fff;
    font-weight: 600;
}

.tab:hover {
    background: #374151;
}

/* Content */
.container-dashboard {
    padding: 20px;
}

.container-dashboard h1 {
    font-size: 20px;
    margin-bottom: 5px;
}

.container-dashboard p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
}

/* Card Video */
.card {
    background: #1e293b;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.card h2 {
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card iframe {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    border: none;
    margin-bottom: 10px;
}

/* Tombol Logout mirip dengan tombol login/register */
.btn-logout {
    padding: 8px 16px;
    background: #22c55e; /* hijau */
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
}

.btn-logout:hover {
    background: #16a34a;
}

/* === SPLASH SCREEN === */
body.splash {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f172a; /* sama dengan login/register */
    font-family: "Poppins", sans-serif;
    overflow: hidden;
    color: #fff;
}

.splash-content {
    text-align: center;
    padding: 20px;
    max-width: 700px;
}

.splash-logo img {
    width: 120px;
    margin-bottom: 20px;
}

.splash-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.splash-subtitle {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 30px;
    color: #cbd5e1;
}

.loader {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid #22c55e; /* hijau sama seperti tombol login/register */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 auto; /* supaya loader tetap di tengah */
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content */
    .container {
      padding: 20px;
    }

    h1 {
      font-size: 20px;
      margin-bottom: 5px;
    }

    p {
      color: #cbd5e1;
      font-size: 14px;
      line-height: 1.5;
    }

    /* Card Grup */
    .groups {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-top: 20px;
    }

    .group-card {
      background: #1e293b;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.3);
      transition: transform 0.3s;
      text-align: center;
    }

    .group-card:hover {
      transform: translateY(-4px);
    }

    .group-card h2 {
      font-size: 18px;
      margin-bottom: 10px;
      color: #22c55e;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .join-btn {
      margin-top: 15px;
      padding: 8px 16px;
      border: none;
      border-radius: 20px;
      background: #22c55e;
      color: #fff;
      font-size: 14px;
      cursor: pointer;
      transition: 0.3s;
    }

    .join-btn:hover {
      background: #16a34a;
    }
    
    /* === CHAT ROOM === */
.chat-room {
    max-width: 600px;
    margin: 30px auto;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #22c55e;
    color: #fff;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.chat-header i {
    margin-right: 6px;
}

.chat-status {
    background: #bbf7d0;
    color: #166534;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat orang lain */
.message.other {
    background: #e5e7eb;
    color: #111827;
    padding: 10px 14px;
    border-radius: 15px 15px 15px 0;
    max-width: 70%;
    align-self: flex-start;
    font-size: 14px;
}

/* Chat user sendiri */
.message.me {
    background: #22c55e;
    color: #fff;
    padding: 10px 14px;
    border-radius: 15px 15px 0 15px;
    max-width: 70%;
    align-self: flex-end;
    font-size: 14px;
}

/* Input area */
.chat-input {
    display: flex;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    outline: none;
    font-size: 14px;
}

.chat-input button {
    margin-left: 10px;
    padding: 12px 20px;
    border-radius: 20px;
    border: none;
    background: #22c55e;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.chat-input button:hover {
    background: #16a34a;
}

/* === KOMITMEN MINGGUAN === */
.commitment-container {
    max-width: 600px;
    margin: 30px auto;
    background: #1e293b;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.commitment-container h2 {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
    color: #22c55e;
}

.commitment-container p {
    font-size: 14px;
    color: #cbd5e1;
    text-align: center;
    margin-bottom: 20px;
}

.commitment-container select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: #374151;
    color: #fff;
    margin-bottom: 20px;
    font-size: 14px;
}

.checklist {
    margin-top: 10px;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: #111827;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}


.checklist label:hover {
    background: #374151;
}

.checklist input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e; /* warna hijau saat dicentang */
    cursor: pointer;
}

.commitment-container button {
    width: 100%;
    padding: 12px;
    background: #22c55e;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    margin-top: 20px;
    transition: 0.3s;
}

.commitment-container button:hover {
    background: #16a34a;
}

/* Alert box (sukses / error) */
.alert {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.alert.success {
    background: #bbf7d0;
    color: #166534;
}

.alert.error {
    background: #fecaca;
    color: #7f1d1d;
}

/* === JUDUL & DROPDOWN === */

label, select {
    font-size: 16px;
    margin-bottom: 10px;
    display: inline-block;
}

select {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: #1e293b;
    color: #fff;
    cursor: pointer;
    outline: none;
    font-size: 15px;
}

select:hover {
    background: #334155;
}

/* === BUTTON SIMPAN === */
button {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    transition: background 0.3s ease;
}

button:hover {
    background: #16a34a;
}

button i {
    font-size: 18px;
}

.sidebar {
      min-height: 100vh;
      background: #1e293b;
      color: #fff;
      padding: 20px 0;
    }
.sidebar h4 {
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
}
.sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    margin: 5px 0;
    border-radius: 8px;
    transition: background 0.3s;
}
.sidebar a:hover {
    background: #334155;
}
.card-stat {
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

    /* Aktif */
.sidebar a.active {
    background: #22c55e;
    color: #fff;
    font-weight: 600;
}

