/* c:\xampp\htdocs\taskmanager\assets\css\style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

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

.navbar {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    margin-left: 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.5rem 0;
}

.navbar-nav a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.navbar-nav a.btn-logout {
    color: var(--danger);
}

.navbar-nav a.btn-logout:hover {
    color: #b91c1c;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    display: block;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-success {
    background-color: var(--success);
    color: #fff;
}

.btn-success:hover {
    background-color: #059669;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mt-1 { margin-top: 1rem; }
.stat-box small {
    display: block;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Grid Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media(min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Task List Styling (Premium Card) */
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    opacity: 0.1;
    transition: opacity 0.3s;
}

.task-item:hover::before {
    opacity: 1;
}

.task-actions {
    display: flex;
    flex-direction: column !important;
    gap: 0.6rem;
    align-items: center;
    justify-content: center;
    padding-left: 1rem;
    border-left: 1px solid #f1f5f9;
}

.task-actions form {
    display: flex;
    width: 100%;
    justify-content: center;
}

.task-actions .btn {
    padding: 10px 14px;
    font-size: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Stats */
.stat-box {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}
.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .navbar {
        position: relative;
        flex-wrap: wrap;
    }

    .navbar-nav {
        display: none; 
        width: 100%;
        flex-direction: column;
        background: var(--card-bg);
        padding: 1rem 0;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .navbar-nav.active {
        display: flex;
    }

    .navbar-nav a {
        width: 100%;
        margin: 0;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #f9fafb;
    }

    .navbar-nav a:last-child {
        border-bottom: none;
    }
}
/* Modal Export Styles */
.modal-overlay {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: rgba(0, 0, 0, 0.5);
 display: none;
 align-items: center;
 justify-content: center;
 z-index: 1000;
 backdrop-filter: blur(4px);
}
.modal-overlay.active {
 display: flex;
}
.modal-content {
 animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
 from { transform: translateY(20px); opacity: 0; }
 to { transform: translateY(0); opacity: 1; }
}

/* Media Gallery & Viewer Styling */
.media-gallery {
 display: flex;
 flex-wrap: wrap;
 gap: 0.5rem;
 margin-top: 0.75rem;
}

.media-thumb {
 width: 70px;
 height: 70px;
 object-fit: cover;
 border-radius: 8px;
 border: 2px solid var(--border-color);
 cursor: pointer;
 transition: all 0.2s ease;
 background: #000; /* For video black bars */
}

.media-thumb:hover {
 transform: scale(1.05);
 border-color: var(--primary-color);
 box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.video-thumb-container {
 position: relative;
 width: 70px;
 height: 70px;
}

.video-thumb-container::after {
 content: "?";
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 color: #fff;
 text-shadow: 0 0 5px rgba(0,0,0,0.5);
 pointer-events: none;
 font-size: 0.8rem;
}

/* Media Viewer (Fullscreen Lightbox) */
#mediaViewerModal {
 background: rgba(0, 0, 0, 0.9);
 z-index: 2000;
}

/* === MEDIA VIEWER LIGHTBOX === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-master-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-controls-floating {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.media-controls-floating > div {
    pointer-events: auto;
}

/* Style Tombol Tool (Zoom & Reset) */
.btn-tool {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-tool:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.15);
}

/* Style Tombol Hapus Premium */
.btn-hapus-premium {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #fff;
    border: none;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-hapus-premium:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    filter: brightness(1.1);
}

.btn-hapus-premium:active {
    transform: scale(0.98);
}

/* Style Tombol Close */
.btn-tool-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.btn-tool-close:hover {
    background: #ef4444;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Media View Container Layout */
.media-view-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.media-view-container:active {
    cursor: grabbing;
}

#viewContent {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.9);
    transition: none; /* Instant for dragging */
    z-index: 5;
    background: #000;
    user-select: none;
    -webkit-user-drag: none;
}

.media-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background: rgba(43, 43, 43, 0.7);
    padding: 10px 25px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    z-index: 1000;
    max-width: 80%;
    border: 1px solid rgba(255,255,255,0.1);
}

/* === RESPONSIVE MODAL === */
@media (max-width: 768px) {
    .media-controls-floating div {
        padding: 8px 15px !important;
        gap: 5px !important;
    }
    .media-controls-floating button {
        font-size: 1.1rem !important;
    }
    /* Memperbesar area ketukan untuk stat-box pada mobile (Standar Apple/Google 44px) */
    .stat-box {
        padding: 1.2rem !important;
        position: relative !important;
        z-index: 50 !important;
        touch-action: manipulation;
    }
    .stat-box a, .stat-box .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 5px;
    }
}

/* Memastikan SweetAlert muncul di depan Media Viewer (z-index 9999) */
.swal2-container {
    z-index: 110000 !important;
}


