/* Override Bootstrap table styles for better integration */
table {
    border-collapse: collapse;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 10px white;
    color: white;
}

td {
   padding: 12px;
   text-align: center;
   border: 1px solid black;
   border-bottom: none;
   border-right: none;
   border-left: none;
}

th {
    background-color: #5E1914;
    color: white;
    padding: 12px;
    text-align: center;
}

tr {
    background-color: white;
    color: black;
}

/* Remove conflicting nama class */
.nama {
    text-align: center;
}

.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 10px;
}

label {
    font-size: 18px;
    margin-bottom: 5px;
    text-align: center;
}

input {
    padding: 8px;
    font-size: 15px;
}

.radio-group {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 10px;
}

.h2 {
    color: white;
    text-align: center;
}

p {
    text-align: center;
}

.nav-underline .nav-link {
    color: grey;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: url('/asset/gb.jpeg') no-repeat center center;
    background-size: cover;
    position: relative;
}

.konten {
    position: relative;
    z-index: 2;
    color: white;
    flex: 1;
    padding: 50px;
}

.konten2 {
    position: relative;
    z-index: 2;
    color: white;
    flex: 1;
    padding: 50px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 1rem;
}

.login-container {
    width: 400px;
    margin: 100px auto;
    background-color: white;
    border-radius: 20px;
    padding: 20px;
}

.tabel {
    width: 100%;
    color: black;
}

.tabel td {
    padding: 8px;
    border: none;
}

.konten3 {
    position: relative;
    color: grey;
    padding: 50px;
    flex: 1;
}

.input1 {
    width: 95%;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 5px;
    color: black;
}

.komentar {
    width: 400px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: grey;
}

.konten5 {
    position: relative;
    z-index: 2;
    color: white;
    padding: 50px;
    flex: 1;
}

.judul {
    text-align: center;
    font-size: 30px;
    color: white;
}

.login {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    color: black;
}

.konten6 {
    position: relative;
    z-index: 2;
    color: white;
    padding: 50px;
    flex: 1;
}

.in {
    color: white;
    font-size: 15px;
    text-align: end;
}

.gambar {
    position: relative;
}

.center-images {
    text-align: center;
    margin-top: 20px;
}

.center-images img {
    margin: 10px;
}

.konten10 {
    z-index: 2;
    color: white;
    padding: 50px;
    flex: 1;
}

.konten11 {
    z-index: 2;
    color: white;
    padding: 50px;
    flex: 1;
    text-align: center;
}

/* IMPROVED RESPONSIVE TABLE STYLES FOR MOBILE */

/* Base responsive table container */
.responsive-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.responsive-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.responsive-table th {
    background: linear-gradient(135deg, #5E1914, #8B2A1B);
    color: white;
    font-weight: 600;
    padding: 16px 12px;
    text-align: center;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.responsive-table td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.responsive-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.responsive-table tr:hover {
    background-color: #e3f2fd;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Large Desktop (1200px and up) */
@media screen and (min-width: 1200px) {
    .responsive-table th,
    .responsive-table td {
        padding: 18px 16px;
        font-size: 16px;
    }
    
    .konten, .konten2, .konten5, .konten6 {
        padding: 60px;
    }
}

/* Desktop (992px to 1199px) */
@media screen and (max-width: 1199px) and (min-width: 992px) {
    .responsive-table th,
    .responsive-table td {
        padding: 16px 14px;
        font-size: 15px;
    }
    
    .konten, .konten2, .konten5, .konten6 {
        padding: 50px 40px;
    }
}

/* Tablet (768px to 991px) */
@media screen and (max-width: 991px) and (min-width: 768px) {
    .responsive-table {
        font-size: 14px;
    }

    .responsive-table th,
    .responsive-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .responsive-table th {
        font-size: 12px;
    }
    
    .konten, .konten2, .konten5, .konten6 {
        padding: 40px 30px;
    }
    
    .responsive-table-container {
        margin: 15px 0;
        border-radius: 12px;
    }
}

/* Mobile Large (576px to 767px) - Card Layout */
@media screen and (max-width: 767px) and (min-width: 576px) {
    .responsive-table-container {
        margin: 10px 0;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 15px;
        border: 2px solid #e9ecef;
        border-radius: 12px;
        padding: 20px 15px;
        background: linear-gradient(135deg, #ffffff, #f8f9fa);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
        position: relative;
        transition: all 0.3s ease;
    }
    
    .responsive-table tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        border-color: #5E1914;
    }

    .responsive-table td {
        text-align: left;
        padding: 8px 0;
        position: relative;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        line-height: 1.6;
        color: #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #5E1914;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-right: 10px;
        min-width: 120px;
        flex-shrink: 0;
    }
    
    .responsive-table td[data-label]::after {
        content: attr(data-content);
        font-weight: 500;
        color: #333;
        text-align: right;
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Special styling for action buttons */
    .responsive-table td[data-label="Aksi"],
    .responsive-table td[data-label="Bukti"] {
        justify-content: center;
        text-align: center;
        padding: 12px 0;
    }

    .responsive-table td[data-label="Aksi"]::before,
    .responsive-table td[data-label="Bukti"]::before {
        display: none;
    }
    
    .responsive-table td[data-label="Aksi"]::after,
    .responsive-table td[data-label="Bukti"]::after {
        display: none;
    }

    /* Time columns styling */
    .responsive-table td[data-label="Waktu Masuk"]::after,
    .responsive-table td[data-label="Waktu Keluar"]::after {
        font-family: 'Courier New', monospace;
        font-weight: 600;
        color: #2c3e50;
        background: #ecf0f1;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 13px;
    }
    
    .konten, .konten2, .konten5, .konten6 {
        padding: 30px 20px;
    }
}

/* Mobile (up to 575px) - Compact Card Layout */
@media screen and (max-width: 575px) {
    .responsive-table-container {
        margin: 8px 0;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 12px;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        padding: 16px 12px;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        position: relative;
        transition: all 0.2s ease;
    }
    
    .responsive-table tr:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
        border-color: #5E1914;
    }

    .responsive-table td {
        text-align: left;
        padding: 6px 0;
        position: relative;
        border: none;
        border-bottom: 1px solid #f8f9fa;
        font-size: 13px;
        line-height: 1.5;
        color: #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 32px;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #5E1914;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        margin-right: 8px;
        min-width: 100px;
        flex-shrink: 0;
    }
    
    .responsive-table td[data-label]::after {
        content: attr(data-content);
        font-weight: 500;
        color: #333;
        text-align: right;
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 13px;
    }

    /* Special styling for action buttons */
    .responsive-table td[data-label="Aksi"],
    .responsive-table td[data-label="Bukti"] {
        justify-content: center;
        text-align: center;
        padding: 10px 0;
        min-height: 40px;
    }

    .responsive-table td[data-label="Aksi"]::before,
    .responsive-table td[data-label="Bukti"]::before {
        display: none;
    }
    
    .responsive-table td[data-label="Aksi"]::after,
    .responsive-table td[data-label="Bukti"]::after {
        display: none;
    }

    /* Time columns styling */
    .responsive-table td[data-label="Waktu Masuk"]::after,
    .responsive-table td[data-label="Waktu Keluar"]::after {
        font-family: 'Courier New', monospace;
        font-weight: 600;
        color: #2c3e50;
        background: #f8f9fa;
        padding: 3px 6px;
        border-radius: 4px;
        font-size: 12px;
    }
    
    .konten, .konten2, .konten5, .konten6 {
        padding: 25px 15px;
    }
    
    .judul {
        font-size: 24px;
    }
}

/* Small Mobile (up to 380px) - Ultra Compact */
@media screen and (max-width: 380px) {
    .responsive-table-container {
        margin: 5px 0;
        border-radius: 6px;
    }
    
    .responsive-table tr {
        margin-bottom: 10px;
        padding: 12px 8px;
        border-radius: 8px;
    }

    .responsive-table td {
        padding: 4px 0;
        font-size: 12px;
        min-height: 28px;
    }

    .responsive-table td::before {
        font-size: 10px;
        min-width: 80px;
        margin-right: 6px;
    }
    
    .responsive-table td[data-label]::after {
        font-size: 12px;
    }

    /* Time columns styling */
    .responsive-table td[data-label="Waktu Masuk"]::after,
    .responsive-table td[data-label="Waktu Keluar"]::after {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    .konten, .konten2, .konten5, .konten6 {
        padding: 20px 10px;
    }
    
    .judul {
        font-size: 20px;
    }
}

/* Button styling improvements for mobile */
@media screen and (max-width: 767px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 8px;
        margin: 2px;
        touch-action: manipulation;
    }
    
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Responsive styles for Kegiatan page */
.konten4 {
    width: 700px;
    margin: 10px auto;
    z-index: 2;
    color: white !important;
    padding: 120px 50px;
    flex: 1;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Enhanced styling for kegiatan page */
.konten4 .judul h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    line-height: 1.3;
}

.konten4 .form-control {
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.konten4 .form-control:focus {
    border-color: #007bff;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.konten4 .btn {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.konten4 .btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
}

.konten4 .btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.konten4 .btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.konten4 .btn-success:hover {
    background: linear-gradient(45deg, #218838, #1dd1a1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.konten4 .btn-danger {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
}

.konten4 .btn-danger:hover {
    background: linear-gradient(45deg, #c82333, #e8680d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Responsive breakpoints for kegiatan page */
@media screen and (min-width: 1200px) {
    .konten4 {
        width: 800px;
        padding: 120px 60px;
    }

    .konten4 .judul h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 1199px) and (min-width: 992px) {
    .konten4 {
        width: 750px;
        padding: 100px 50px;
    }

    .konten4 .judul h1 {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 991px) and (min-width: 768px) {
    .konten4 {
        width: 90%;
        max-width: 600px;
        padding: 80px 40px;
        margin: 20px auto;
    }

    .konten4 .judul h1 {
        font-size: 2rem;
    }

    .konten4 .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 767px) and (min-width: 576px) {
    .konten4 {
        width: 95%;
        padding: 60px 30px;
        margin: 15px auto;
    }

    .konten4 .judul h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .konten4 .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 10px;
    }

    .konten4 .mb-3 {
        margin-bottom: 1.5rem;
    }

    .konten4 .form-control {
        font-size: 1rem;
    }
}

@media screen and (max-width: 575px) {
    .konten4 {
        width: 98%;
        padding: 40px 20px;
        margin: 10px auto;
        border-radius: 15px;
    }

    .konten4 .judul h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }

    .konten4 .btn {
        padding: 12px 15px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 10px;
        border-radius: 20px;
    }

    .konten4 .mb-3 {
        margin-bottom: 1.5rem;
    }

    .konten4 .form-control {
        font-size: 1rem;
        border-radius: 8px;
        padding: 12px;
    }

    .konten4 .d-flex {
        flex-direction: column;
        gap: 10px;
    }

    .konten4 .btn-danger {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }

    .konten4 #tambah-form {
        margin-bottom: 20px;
    }

    .konten4 form {
        margin-top: 20px;
    }
}

@media screen and (max-width: 380px) {
    .konten4 {
        padding: 30px 15px;
        margin: 5px auto;
    }

    .konten4 .judul h1 {
        font-size: 1.3rem;
    }

    .konten4 .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .konten4 .form-control {
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* Navigation responsive improvements */
@media screen and (max-width: 767px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements */
@media screen and (max-width: 767px) {
    .konten4 .btn, .konten4 .form-control {
        min-height: 44px;
    }

    .konten4 .btn {
        min-width: 44px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .konten4 {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .konten4 {
        border: 2px solid white;
    }

    .konten4 .form-control {
        border: 2px solid white;
    }
}

/* Print styles */
@media print {
    .konten4 {
        background: white !important;
        color: black !important;
        box-shadow: none;
        border: 1px solid black;
    }

    .konten4 .btn {
        display: none;
    }
    
    .responsive-table-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .responsive-table tr {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Loading animation for better UX */
.table-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 16px;
    color: #666;
}

.table-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5E1914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.responsive-table:focus-within {
    outline: 2px solid #5E1914;
    outline-offset: 2px;
}

.responsive-table td:focus,
.responsive-table th:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    background-color: #e3f2fd;
}

/* Smooth scrolling for table container */
.responsive-table-container {
    scroll-behavior: smooth;
}

/* Enhanced visual feedback */
.responsive-table tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.responsive-table tr:active {
    transform: scale(0.98);
}

/* Better spacing for mobile navigation */
@media screen and (max-width: 767px) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    body {
        padding-top: 70px; /* Account for fixed navbar */
    }
}