/*--------------------------------------------------------------
# Import Fonts
--------------------------------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Fira+Code:wght@400;500&display=swap');

/*--------------------------------------------------------------
# Root Variables
--------------------------------------------------------------*/
:root {
    --primary: #ff4500;
    --primary-dark: #CC3D00;
    --bg: #f4f4f4;
    --text: #222;
    --border: #111;
    --code-bg: #f5ecec;
    --sidebar-width: 250px;
    --header-height: 60px;
}

/*--------------------------------------------------------------
# Reset & Base Styles
--------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dashboard {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
    padding-bottom: 0;
}

body.login {
    --primary: #ff4500;
    --bg: #f4f4f4;
    --text: #222;
    --border: #111;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 i {
    color: var(--primary);
}

h3 {
    font-size: 1.3rem;
    margin: 20px 0 15px;
    color: var(--primary-dark);
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
header {
    background-color: var(--primary);
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid var(--border);
    border-radius: 8px;
    transform: rotate(-0.5deg);
    box-shadow: 6px 6px 0 var(--border);
}

header .container {
    transform: rotate(0.5deg);
}

header p {
    font-size: 1rem;
    color: white;
    max-width: 600px;
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 3px solid var(--border);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    padding: 8px 20px;
    border-left: 4px solid transparent;
}

.sidebar-nav li:hover {
    background: #f0f0f0;
    border-left-color: var(--primary);
}

.sidebar-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
}

/*--------------------------------------------------------------
# Main Content
--------------------------------------------------------------*/
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    max-width: calc(100% - var(--sidebar-width));
}

/*
.container {
    max-width: 1000px;
    margin: 0 auto;
}*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }

/*--------------------------------------------------------------
# Blocks & Sections
--------------------------------------------------------------*/
.content-block {
    background: white;
    border: 3px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 6px 6px 0 var(--border);
    position: relative;
}

.info-box {
    background: #f8f8f8;
    border-left: 4px solid var(--primary);
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 6px 6px 0;
}

.info-box.warning {
    border-left-color: #ffd700;
    background: #fff9e6;
}

/*--------------------------------------------------------------
# Code Blocks
--------------------------------------------------------------*/
.code-wrapper {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    border: 2px solid var(--border);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background: var(--primary-dark);
}

pre {
    background: var(--code-bg);
    border: 3px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    overflow-x: auto;
    margin: 15px 0;
    box-shadow: 4px 4px 0 var(--border);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.link-next {
    display: inline-flex;
    align-items: center;
    background-color: #ff4500; /* Oranye terang */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.link-next i {
margin-right: 0.5rem;
}

.link-next:hover {
background-color: #e03d00;
}

.complete-btn {
    /*
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px; */

    display: inline-flex;
    align-items: center;
    background-color: #ff4500; /* Oranye terang */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .complete-btn:hover {
    /* background-color: #218838; */
    background: var(--primary-dark);
    cursor: pointer;
  }

  
/*--------------------------------------------------------------
# Tables
--------------------------------------------------------------*/
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 6px;
    border: 3px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

th,
td {
    border: 2px solid var(--border);
    padding: 12px 15px;
    text-align: left;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

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

/*--------------------------------------------------------------
# Lists
--------------------------------------------------------------*/
ul,
ol {
    list-style-position: inside;
    margin: 15px 0;
    font-size: 0.95rem;
}

li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

ul li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/*--------------------------------------------------------------
# Login Form
--------------------------------------------------------------*/
.header {
    background: var(--primary);
    color: white;
    padding: 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 4px 4px 0 var(--border);
}

.login-container {
    max-width: 400px;
    background: white;
    margin: 3rem auto;
    padding: 2rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--border);
}

.login-container h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 1.2rem;
    border: 2px solid var(--border);
    border-radius: 6px;
}

button[type="submit"] {
    /* width: 100%; */
    width: auto;
    background: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--border);
}

select {
    width: 100%;
    padding: 10px;
    margin-bottom: 1.2rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    background-color: white;
    color: #333;
    font-size: 1rem;
    appearance: none; /* Hilangkan default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='292.4' height='292.4'%3E%3Cpath fill='%23666' d='M287 69.4l-14.2-14.3-126.3 126-126-126L6.3 69.4l140.5 140.6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(100, 100, 255, 0.2);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .filter-item {
    flex: 1 1 200px;
    min-width: 200px;
  }
  
  .filter-item label {
    display: block;
    margin-bottom: 0.4rem;
  }

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--border);
    box-shadow: 3px 3px 0 var(--border);
    opacity: 0;
    transition: opacity 0.3s;
}

#scroll-top.visible {
    opacity: 1;
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
    }

    .menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: var(--primary);
        color: white;
        padding: 10px;
        border-radius: 5px;
        cursor: pointer;
        border: 2px solid var(--border);
    }
}

/*--------------------------------------------------------------
# Course Page
--------------------------------------------------------------*/
.course-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
  }
  /*
  .main-content {
    flex: 1 1 0;
    min-width: 0;
  }
  */
  /*
  .lesson-sidebar {
    flex: 0 0 250px;
    max-width: 250px;
    margin-left: auto;
    position: sticky;
    top: 20px;
  }
  */
  .lesson-list {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  .lesson-list h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
 /* .lesson-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .lesson-list li {
    margin-bottom: 8px;
  }
  
  .lesson-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
  }
  */
  .lesson-list a:hover {
    background: #f0f0f0;
  }
  /*
  .lesson-list a.active {
    background: #e0f3ff;
    color: #007bff;
    font-weight: bold;
  }
    */

  .lesson-sidebar {
    flex: 1 1 25%;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
  }

  .lesson-note {
    margin-top: 20px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  .lesson-list ul {
    list-style: none;
    padding: 0;
  }

  .lesson-list li {
    margin-bottom: 10px;
  }

  .lesson-list a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
  }

  .lesson-list a.active {
    background: #007bff;
    color: white;
  }

  
  .lesson-container {
    display: flex;
    flex-direction: row;
    gap: 2rem; /* 20px;*/
    margin-bottom: 2rem; /* 20px;*/
  }
  
  .video-container {
    width: 100%;
  }
  
  .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
  }
  
  .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }

  .video-wrapper {
    flex: 1 1 70%;
  }
/*
  .video-wrapper iframe {
    width: 100%;
    height: 360px;
    border: none;
  }
*/
  .lesson-done {
    color: green;
    margin-left: 5px;
  }
  


@media (max-width: 768px) {
    .course-container {
    flex-direction: column;
    }
    
    .container {
        padding: 0;
    }

    h1 {
        font-size: 2rem;
    }

    .content-block {
        padding: 20px;
    }

    pre {
        padding: 15px;
        font-size: 0.85rem;
    }

    .lesson-sidebar {
        position: static;
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
      }
      .lesson-container {
        flex-direction: column;
      }
      .video-wrapper,
  .lesson-sidebar {
    flex: 1 1 100%;
  }
  .video-wrapper {
    order: 1;
  }

  .lesson-note {
    order: 2;
  }

  .lesson-sidebar {
    order: 3;
  }
  .filter-group {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    header {
        padding: 20px;
    }

    .main-content {
        padding: 20px;
    }

    .content-block {
        padding: 15px;
    }

    .header {
        font-size: 1.2rem;
        padding: 1.5rem 1rem;
    }

    .login-container {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
}

/*--------------------------------------------------------------
# Additional Class
--------------------------------------------------------------*/

/* Margin Top */
.mt-1 { margin-top: 0.25rem; }   /* 4px */
.mt-2 { margin-top: 0.5rem; }    /* 8px */
.mt-3 { margin-top: 0.75rem; }   /* 12px */
.mt-4 { margin-top: 1rem; }      /* 16px */
.mt-5 { margin-top: 1.25rem; }   /* 20px */

/* Margin Bottom */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

/* Margin Left & Right */
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

/* Padding Top */
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }

/* Padding Bottom */
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }

/* Padding All */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* New Line / Block Display */
.block { display: block; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* === TEXT COLORS === */
.text-white { color: #fff; }
.text-black { color: #000; }
.text-gray { color: #6b7280; }
.text-red { color: #ef4444; }
.text-green { color: #10b981; }
.text-blue { color: #3b82f6; }
.text-yellow { color: #facc15; }
.text-purple { color: #8b5cf6; }

/* === BACKGROUND COLORS === */
.bg-white { background-color: #fff; }
.bg-black { background-color: #000; }
.bg-gray { background-color: #e5e7eb; }
.bg-red { background-color: #f87171; }
.bg-green { background-color: #34d399; }
.bg-blue { background-color: #60a5fa; }
.bg-yellow { background-color: #fde68a; }
.bg-purple { background-color: #c4b5fd; }

/* Widths in rem */
/* Utility Widths (rem-based) */
.w-0   { width: 0rem; }
.w-1   { width: 0.25rem; }  /* 4px */
.w-2   { width: 0.5rem; }   /* 8px */
.w-3   { width: 0.75rem; }  /* 12px */
.w-4   { width: 1rem; }     /* 16px */
.w-5   { width: 1.25rem; }  /* 20px */
.w-6   { width: 1.5rem; }   /* 24px */
.w-8   { width: 2rem; }     /* 32px */
.w-10  { width: 2.5rem; }   /* 40px */
.w-12  { width: 3rem; }     /* 48px */
.w-16  { width: 4rem; }     /* 64px */
.w-20  { width: 5rem; }     /* 80px */
.w-24  { width: 6rem; }     /* 96px */
.w-32  { width: 8rem; }     /* 128px */
.w-40  { width: 10rem; }    /* 160px */
.w-48  { width: 12rem; }    /* 192px */
.w-56  { width: 14rem; }    /* 224px */
.w-64  { width: 16rem; }    /* 256px */
.w-auto { width: auto; }

/* Utility Widths (percentage-based) */
.w-p10  { width: 10%; }
.w-p20  { width: 20%; }
.w-p25  { width: 25%; }
.w-p33  { width: 33.3333%; }
.w-p40  { width: 40%; }
.w-p50  { width: 50%; }
.w-p60  { width: 60%; }
.w-p66  { width: 66.6667%; }
.w-p75  { width: 75%; }
.w-p80  { width: 80%; }
.w-p90  { width: 90%; }
.w-full { width: 100%; }

/* Height All */
.h-0   { height: 0rem; }
.h-1   { height: 0.25rem; }   /* 4px */
.h-2   { height: 0.5rem; }    /* 8px */
.h-3   { height: 0.75rem; }   /* 12px */
.h-4   { height: 1rem; }      /* 16px */
.h-6   { height: 1.5rem; }    /* 24px */
.h-8   { height: 2rem; }      /* 32px */
.h-10  { height: 2.5rem; }    /* 40px */
.h-12  { height: 3rem; }      /* 48px */
.h-16  { height: 4rem; }      /* 64px */
.h-24  { height: 6rem; }      /* 96px */
.h-32  { height: 8rem; }      /* 128px */
.h-48  { height: 12rem; }     /* 192px */
.h-64  { height: 16rem; }     /* 256px */
.h-auto { height: auto; }
.h-full { height: 100%; }

.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.min-w-16 { min-width: 4rem; }
.min-w-32 { min-width: 8rem; }
.min-w-64 { min-width: 16rem; }

.max-w-16 { max-width: 4rem; }
.max-w-32 { max-width: 8rem; }
.max-w-64 { max-width: 16rem; }
.max-w-full { max-width: 100%; }
.max-w-screen-sm { max-width: 640px; }
.max-w-screen-md { max-width: 768px; }
.max-w-screen-lg { max-width: 1024px; }
.max-w-screen-xl { max-width: 1280px; }

@media (min-width: 640px) {
  .sm\:w-32 { width: 8rem; }
  .sm\:w-48 { width: 12rem; }
  .sm\:w-64 { width: 16rem; }
  .sm\:w-full { width: 100%; }
}

@media (min-width: 768px) {
  .md\:w-32 { width: 8rem; }
  .md\:w-48 { width: 12rem; }
  .md\:w-64 { width: 16rem; }
  .md\:w-full { width: 100%; }
}

@media (min-width: 1024px) {
  .lg\:w-32 { width: 8rem; }
  .lg\:w-48 { width: 12rem; }
  .lg\:w-64 { width: 16rem; }
  .lg\:w-80 { width: 20rem; }
  .lg\:w-full { width: 100%; }
}

@media (min-width: 1280px) {
  .xl\:w-32 { width: 8rem; }
  .xl\:w-48 { width: 12rem; }
  .xl\:w-64 { width: 16rem; }
  .xl\:w-80 { width: 20rem; }
  .xl\:w-full { width: 100%; }
}


/*--------------------------------------------------------------
# breadcrumb Class
--------------------------------------------------------------*/

.breadcrumb {
    margin: 1rem 0;
    font-size: 0.95rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  
  .breadcrumb a {
    color: #007bff;
    text-decoration: none;
  }
  
  .breadcrumb a:hover {
    text-decoration: underline;
  }
  
  .breadcrumb .current {
    color: #333;
    font-weight: bold;
  }
  
/*--------------------------------------------------------------
# Tab
--------------------------------------------------------------*/

  .tab-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .tab-btn {
    padding: 0.5rem 1rem;
    background: #eee;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
  }
  .tab-btn.active {
    background: var(--primary);
    color: white;
    font-weight: bold;
  }
  .tab-content.hidden {
    display: none;
  }
  .avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
  }
  
/*--------------------------------------------------------------
# Password show/hide
--------------------------------------------------------------*/
.password-group {
  position: relative;
}

.password-group input[type="password"] {
  padding-right: 2.5rem; /* ruang buat ikon */
  height: 2.75rem;        /* pastikan tinggi cukup */
  line-height: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #888;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--primary);
}


/*--------------------------------------------------------------
# hamburger menu (tombol 3 garis)  
--------------------------------------------------------------*/

/* Hamburger Button (Mobile Only) */
.hamburger {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--border);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--border);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  margin: 3px auto;
  transition: 0.3s;
}

/* Show only on mobile */
@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    max-width: 100%;
  }
}

