:root {
    --primary-red: #ef4444;
    --primary-yellow: #f59e0b;
    --primary-green: rgb(76, 209, 76);
    --primary-blue: rgb(106, 106, 224);
    --primary-brown: brown;
    --bg-light: #f8fafc;
    --text-dark: #334155;
    --card-white: #ffffff;
    --nav-clr: #ffffff;
    --line-clr: #e5e7eb;
    --text-clr: #6b7280;
    --accent-clr: #ef4444;
    --hover-clr: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-dark);
}

.main-header {
    background-color: var(--primary-red);
    color: white;
    padding: 20px 0 20px 0;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 0;
}

.brand {
    display: flex;
    flex-direction: column;
    margin: 0 0 8px 20px;
}
.brand h1 {
    margin: 0;
    font-size: 2rem;
}
.brand p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Navigasi */
#sidebar {
    box-sizing: border-box;
    height: 100vh;
    width: 250px;
    padding: 5px 1em;
    background-color: var(--nav-clr);
    border-right: 1px solid var(--line-clr);
    position: sticky;
    top: 0;
    align-self: start;
    transition: 300ms ease-in-out;
}

#sidebar.close {
    padding: 5px;
    width: 60px;
    overflow: hidden;
    text-wrap: nowrap;
}

#sidebar.close .nav-logo {
    display: none;
}

#sidebar ul {
    list-style: none;
}

#sidebar > ul > li:first-child {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
    .nav-logo {
        font-weight: 600;
    }
}

#sidebar ul li.active a {
    color: var(--accent-clr);

    svg {
        fill: var(--accent-clr);
    }
}

#sidebar a,
#sidebar .dropdown-btn,
#sidebar .logo {
    border-radius: 0.5em;
    padding: 0.85em;
    text-decoration: none;
    color: var(--text-clr);
    display: flex;
    align-items: center;
    gap: 1em;
}

#sidebar svg {
    flex-shrink: 0;
    fill: var(--text-clr);
}

#sidebar a span,
#sidebar .dropdown-btn span {
    flex-grow: 1;
}

#sidebar a:hover,
#sidebar .dropdown-btn:hover {
    background-color: var(--hover-clr);
}

/* dropdown menu style */
#sidebar .sub-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: 300ms ease-in-out;

    > div {
        overflow: hidden;
    }
}

#sidebar .sub-menu.show {
    grid-template-rows: 1fr;
}

.dropdown-btn svg {
    transition: 200ms ease;
}

.rotate svg:last-child {
    rotate: -180deg;
}

#sidebar .sub-menu a {
    padding-left: 2em;
}

#toggle-btn {
    margin-left: auto;
    padding: 1em;
    border: none;
    border-radius: 0.5em;
    background: none;
    cursor: pointer;

    svg {
        transition: rotate 150ms ease;
    }
}

#toggle-btn:hover {
    background-color: var(--hover-clr);
}

/* Content Area */
.content-wrapper {
    display: flex;
    flex: 1;
}

main {
    flex: 1;
    padding: min(30px, 7%);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Stat Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    border-bottom: 4px solid #ddd;
}

.stat-card.active-border {
    border-color: var(--primary-red);
}

/* Announcement Style */
.announcement-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-left: 5px solid #ddd;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
}

.date-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Search Form */
.search-container {
    margin-top: 45px;
    margin-bottom: 20px;
    text-align: center;
}

.search-form {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid var(--primary-yellow);
    border-radius: 25px;
    font-size: 1rem;
    width: 250px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--primary-red);
}

.search-button {
    padding: 10px 20px;
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #dc2626;
}

/* Create Button */
.create-siswa-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.create-siswa-btn:hover {
    background-color: #dc2626;
}

.create-siswa-btn svg {
    flex-shrink: 0;
}

/* card siswa */
.siswa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    position: relative;
    width: 100%;
    background-color: var(--card-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
    background-color: var(--accent-clr);
}

.team-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.team-card .info {
    padding: 15px;
    text-align: center;
}

.team-card .info h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.team-card .info p {
    color: var(--text-dark);
    margin: 0;
}

.team-card:hover .info h3,
.team-card:hover .info p {
    color: var(--line-clr);
}

.team-card .crud {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
}

.team-card .crud a,
.team-card .crud button {
    text-decoration: none;
    color: var(--primary-red);
    font-size: 0.9rem;
    padding: 5px 10px;
    border: 1px solid var(--primary-red);
    border-radius: 5px;
    transition: background-color 0.3s;
}

.team-card .crud a:hover,
.team-card .crud button:hover {
    background-color: var(--primary-red);
    color: white;
}

tr td li {
    list-style: none;
}



#sidebar a, .nav-link{
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

#sidebar a:hover, .nav-link:hover {
    transform: translateX(12px) scale(1.02) !important; 
    background: rgba(239, 68, 68, 0.1) !important; 
    color: #ef4444 !important; 
    
    
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 
                0 0 15px rgba(239, 68, 68, 0.3) !important; }

#sidebar a:hover svg, .nav-link:hover svg {
    transform: scale(1.1);
    fill: #ef4444 !important;
}


.schedule-wrapper {
    padding: 20px;
    background: #f8fafc;
    min-height: 100vh;
}

.main-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    border-left: 6px solid #ef4444;
    padding-left: 15px;
}


.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.modern-table thead th {
    background: #ef4444;
    color: white;
    padding: 15px;
    text-transform: uppercase;
}

.modern-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    text-align: center;
    transition: all 0.3s ease; /* Transisi buat hover */
}

/* Kolom Waktu */
.time-tag {
    font-weight: bold;
    background: #f8fafc;
    color: #ef4444 !important;
}

/* Baris Istirahat */
.break-row {
    background: #fef2f2 !important;
    font-weight: bold;
    color: #ef4444;
    font-style: italic;
}

.piket-row {
    background: #fef2f2 !important;
    font-weight: bold;
    color: #ef4444;
    font-style: italic;
}


.prodi {
    color: #0f172a;
    font-weight: 600;
}

.extra-class {
    background: #fff1f2;
    font-weight: bold;
}


.modern-table tbody tr:hover {
    background-color: #fffafa; 
    transform: scale(1.005); 
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.05);
}

.modern-table td:hover {
    color: #ef4444;
    font-weight: bold;
    cursor: default;
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}


@media (max-width: 768px) {
    .table-container { overflow-x: auto; }
}


.main-header .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}


.navbar-right-elements {
    display: flex;
    align-items: center;
    justify-content: flex-end; 
    flex-grow: 1; 
    gap: 30px; 
}


.brand-container {
    text-align: left; 
    margin-right: auto; 
}

.right-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}


.indonesia-flag {
    width: 30px; 
    height: auto;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.class-name {
    margin: 0;
    font-size: 1.5rem;
}


.main-header .container-fluid {
    position: relative; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    padding: 0 20px;
}


.brand-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.class-name {
    margin: 0;
    font-size: 1.8rem;
}

.brand-container p {
    margin: 0;
    font-size: 0.9rem;
}


.flag-container {
    position: absolute; 
    right: 20px;       
    top: 9%;         
    transform: translateY(-50%); 
    z-index: 9999;
}

.indonesia-flag {
    width: 35px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Logo biar tetep di kiri */
.navbar-brand {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}



/* tombol login */
.logbtn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-yellow);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    margin-left: 10px;
}

/* show siswa */
.container-show {
    display: flex;
    justify-content: center;
    height: 100vh;
}

.show-siswa {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 3px solid var(--line-clr);
    border-radius: 10px;
    width: 250px;
    height: 300px;
    transition: all 0.3s ease;
}

.show-siswa:hover {
    border-color: var(--primary-red);
    transform: translateY(5.3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.show-siswa img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-red);
}

.show-siswa .info {
    text-align: center;
}
.show-siswa .info h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.show-siswa .info p {
    color: var(--text-dark);
    margin: 5px 0;
}

/* index pengumuman style */
.h1-pengumuman {
    color: var(--primary-yellow);
    display: flex;
    justify-content: center;
}

.create-pengumuman {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}
