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

:root {
    --blue-dark: #0a0e1a;
    --blue-mid: #0d1b3e;
    --blue-accent: #1e3a8a;
    --blue-bright: #3b82f6;
    --blue-glow: #60a5fa;
    --cyan-accent: #06b6d4;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f6ff;
    --text-secondary: rgba(200, 220, 255, 0.7);
    --text-muted: rgba(150, 180, 220, 0.5);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(100, 160, 255, 0.25);
    --input-focus: rgba(59, 130, 246, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
    --shadow-deep: 0 25px 60px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
    font-family: "Open Sauce One", sans-serif;
    background: var(--blue-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */

.bg-animated {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #0a0e1a 0%, #0d1b3e 40%, #0f2060 70%, #0a1628 100%);
    overflow: hidden;
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: pulse-orb 8s ease-in-out infinite alternate;
}

.bg-animated::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    animation: pulse-orb 10s ease-in-out infinite alternate-reverse;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-drift 20s linear infinite;
}

.floating-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--blue-bright);
    border-radius: 50%;
    opacity: 0;
    animation: float-particle linear infinite;
}

@keyframes pulse-orb {
    0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
    100% { transform: scale(1.3) translate(30px, 30px); opacity: 1; }
}

@keyframes grid-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes float-particle {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* ===== MAIN WRAPPER ===== */

.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 20vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR ===== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar-logo img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgb(255, 255, 255));
    transition: var(--transition);
}

.navbar-logo-placeholder {
    height: 44px;
    width: 44px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

.navbar-logo-text {
    display: flex;
    flex-direction: column;
}

.navbar-logo-text .inst-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue-dark);
    line-height: 1.2;
}

.navbar-logo-text .inst-sub {
    font-size: 10px;
    color: var(--blue-dark);
    line-height: 1.2;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-nav {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--blue-dark);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--blue-dark);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-nav:hover {
    background: var(--glass-hover);
    border-color: var(--blue-dark);
    color: var(--blue-dark);
    box-shadow: 0 0 20px rgb(255, 255, 255);
    transform: translateY(-1px);
}

.btn-nav:active {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
}

/* ===== LOGIN PAGE ===== */

.login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 88px 20px 24px;
    min-height: 100dvh;
    box-sizing: border-box;
}

.login-container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px
}

/* Project Logo/Identity */

.project-identity {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.2vh, 20px);
    animation: fade-in-down 0.7s ease both;
}

.project-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-logo-wrap img {
    max-width: clamp(190px, 32vh, 290px);
    max-height: clamp(180px, 32vh, 280px);
    width: auto;
    height: auto;
    display: block;
}

.project-name {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
    line-height: 1.1;
    margin: 0;
}

.project-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 4px;
}

/* Glass Card */

.glass-card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: clamp(18px, 2.8vh, 28px);
    box-shadow: var(--shadow-deep), var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
}

.card-title {
    font-size: clamp(15px, 1.9vh, 18px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    text-align: center;
}

.card-subtitle {
    font-size: clamp(11px, 1.4vh, 12px);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 5px
}

/* Form */
.form-group {
    margin-bottom: clamp(8px, 1.5vh, 14px);
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: clamp(9px, 1.4vh, 12px) 14px clamp(9px, 1.4vh, 12px) 40px;
    font-size: clamp(13px, 1.7vh, 14px);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: "Open Sauce One", sans-serif;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.form-input:focus {
    border-color: var(--blue-bright);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 3px var(--input-focus), 0 0 20px rgba(59, 130, 246, 0.1);
}

.form-input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
    color: var(--blue-bright);
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: var(--transition);
}

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

/* Alert */

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Submit Button */

.btn-submit {
    width: 100%;
    padding: clamp(10px, 1.6vh, 13px);
    font-size: clamp(13px, 1.7vh, 14px);
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 50%, #0e7490 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(29, 78, 216, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(29, 78, 216, 0.6), 0 0 40px rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #0891b2 100%);
}

.btn-submit:hover::before {
    opacity: 1;
}

.btn-submit:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(29, 78, 216, 0.4);
}

.btn-submit .btn-ripple {
    position: absolute;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-submit.loading .btn-spinner { display: block; }

.btn-submit.loading .btn-text { opacity: 0.7; }

@keyframes ripple {
    to { width: 400px; height: 400px; opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */

.card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 24px 0 16px;
}

.card-footer-text {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
}

/* ===== ABOUT PAGE ===== */

.about-page {
    padding-top: 80px;
}

.about-hero {
    position: relative;
    padding: 80px 20px 60px;
    text-align: center;
    overflow: hidden;
}

.about-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.about-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--blue-glow);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    animation: fade-in-down 0.6s ease both;
}

.about-title {
    font-size: clamp(32px, 6vw, 52px);
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #f0f6ff 0%, #93c5fd 60%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
    margin-bottom: 20px;
    animation: fade-in-down 0.6s ease 0.1s both;
}

.about-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fade-in-up 0.6s ease 0.2s both;
}

.about-project-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 16px;
}

.about-project-logo img {
    width: 350px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* About Sections */

.about-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-header {
    margin-bottom: 40px;
}

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cyan-accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-title span {
    background: linear-gradient(135deg, var(--blue-bright), var(--cyan-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.7;
    max-width: 720px;
}

/* Feature Cards */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-bright), var(--cyan-accent));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 20px rgba(59, 130, 246, 0.1);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(29,78,216,0.3), rgba(6,182,212,0.2));
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon i {
    font-size: 17px;
    color: #ffffff;
}

.feature-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-icon {
    font-size: 1.3rem;
}

.contact-icon i {
    color: #ffffff;
}

/* Photo Gallery */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: var(--transition);
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.gallery-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.03);
}

.gallery-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(13, 27, 62, 0.8), rgba(10, 20, 50, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    border-bottom: 1px solid var(--glass-border);
}

.gallery-placeholder-icon {
    font-size: 36px;
    opacity: 0.4;
}

.gallery-caption {
    padding: 16px;
}

.gallery-caption-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gallery-caption-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Team Cards */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 2fr);
    gap: 20px;
}

.team-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 30px rgba(59, 130, 246, 0.1);
}

.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border: 2px solid rgba(96, 165, 250, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transition: var(--transition);
    overflow: hidden;
}

.team-card:hover .team-avatar {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.team-nim {
    font-size: 12px;
    color: var(--blue-glow);
    font-family: "Open Sauce One", sans-serif;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.team-role {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    color: var(--text-secondary);
}

/* Supervisor Cards */

.supervisor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.supervisor-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.supervisor-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.supervisor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #0e7490);
    border: 2px solid rgba(96, 165, 250, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.supervisor-info .title {
    font-size: 11px;
    color: var(--cyan-accent);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.supervisor-info .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.supervisor-info .nip {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: "Open Sauce One", sans-serif;
}

/* Contact Section */

.contact-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.contact-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: var(--glass-hover);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(29,78,216,0.3), rgba(6,182,212,0.2));
    border: 1px solid rgba(96, 165, 250, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-details .label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.contact-details .value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-details .value a {
    color: var(--blue-glow);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details .value a:hover {
    color: var(--cyan-accent);
}

/* Divider */

.section-divider {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-divider hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

/* Footer */

.footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.footer-text {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-text strong {
    color: var(--text-secondary);
}

/* ===== ANIMATIONS ===== */

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SCROLLBAR ===== */

::-webkit-scrollbar { width: 6px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: 3px; }

::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.5); }

/* ================================================================
                            DASHBOARD PAGE
   ================================================================ */

/* ----- Dashboard Layout ----- */

.dashboard-page {
    padding-top: 72px;
    min-height: 100vh;
}

/* ----- Greeting Bar ----- */

.greeting-bar {
    max-width: 1300px;
    margin: 0 auto;
    padding: 32px 28px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    animation: fade-in-down 0.6s ease both;
}

.greeting-name {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #f0f6ff 0%, #93c5fd 60%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 6px;
}

.greeting-sub {
    font-size: 13px;
    color: var(--text-secondary);
}

.greeting-right {
    text-align: right;
    flex-shrink: 0;
}

.clock-time {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 4px;
    font-family: "Open Sauce One", sans-serif;
}

.clock-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.clock-tz {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--cyan-accent);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 100px;
    padding: 2px 8px;
    letter-spacing: 1px;
    font-weight: 500;
}

.uvc-info{
    margin-top:10px;
    text-align:right;
}

.uvc-label{
    font-size:13px;
    font-weight:600;
    color:#ffffff;
}

.uvc-on{
    color:#22c55e;
    font-weight:700;
}

.uvc-off{
    color:#ef4444;
    font-weight:700;
}

.uvc-schedule{
    margin-top:2px;
    font-size:11px;
    color:#94a3b8;
}

.greeting-logo {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.greeting-logo img {
    width: 300px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ----- Metric Cards Row ----- */

.metrics-row {
    max-width: 1300px;
    margin: 15px auto 0;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    animation: fade-in-up 0.6s ease 0.1s both;
}

.metric-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    opacity: 0;
    transition: var(--transition);
}

.metric-card.temp::before    { background: linear-gradient(90deg, #ef4444, #f97316); }

.metric-card.hum::before     { background: linear-gradient(90deg, #3b82f6, #06b6d4); }

.metric-card.fan::before     { background: linear-gradient(90deg, #10b981, #34d399); }

.metric-card.peltier::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

.metric-card:hover { transform: translateY(-3px); border-color: rgba(96,165,250,0.3); }

.metric-card:hover::before { opacity: 1; }

.metric-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.metric-card.temp .metric-icon-wrap {
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.25);
    color: #ef4444;
}

.metric-card.hum .metric-icon-wrap {
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.25);
    color: #3b82f6;
}

.metric-card.fan .metric-icon-wrap {
    background: rgba(16,185,129,.12);
    border: 1px solid rgba(16,185,129,.25);
    color: #10b981;
}

.metric-card.peltier .metric-icon-wrap {
    background: rgba(139,92,246,.12);
    border: 1px solid rgba(139,92,246,.25);
    color: #8b5cf6;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
    margin-bottom: 4px;
}

.metric-value {
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: "Open Sauce One", sans-serif;
}

.metric-card.temp .metric-value {
    color: #fca5a5;
}

.metric-card.hum .metric-value {
    color: #93c5fd;
}

.metric-card.fan .metric-value {
    color: #6ee7b7;
}

.metric-card.peltier .metric-value {
    color: #c4b5fd;
}

.metric-unit {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.7;
    margin-left: 2px;
}

.metric-range {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
    margin-bottom: 2px;
}

.metric-status {
    font-size: 11px;
    margin-top: 5px;
    font-weight: 500;
}

.status-ok   { color: #4ade80; }
.status-warn { color: #fbbf24; }
.status-offline{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:3px 8px;
    font-size:11px;
    font-weight:600;
    letter-spacing:.2px;
    color:#ff8a8a;
    background:rgba(255,70,70,.08);
    border:1px solid rgba(255,70,70,.25);
    border-radius:999px;
    animation:offlinePulse 2s infinite;
}

@keyframes offlinePulse{
    0%{
        opacity:1;
    }
    50%{
        opacity:.7;
    }
    100%{
        opacity:1;
    }
}

/* ----- Charts Section ----- */

.charts-section {
    max-width: 1300px;
    margin: 20px auto 0;
    padding: 0 20px 10px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.chart-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.chart-card:hover {
    border-color: rgba(96, 165, 250, 0.25);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
}

.chart-card.temp-chart::before  { background: linear-gradient(90deg, #ef4444, #f97316); }
.chart-card.hum-chart::before   { background: linear-gradient(90deg, #3b82f6, #06b6d4); }

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.temp-chart  .chart-dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.hum-chart   .chart-dot { background: #3b82f6; box-shadow: 0 0 6px #3b82f6; }

.chart-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 100px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.temp-chart  .chart-badge { background: rgba(239,68,68,0.12);  color: #fca5a5;  border: 1px solid rgba(239,68,68,0.2); }
.hum-chart   .chart-badge { background: rgba(59,130,246,0.12); color: #93c5fd;  border: 1px solid rgba(59,130,246,0.2); }

.chart-canvas-wrap {
    position: relative;
    height: 180px;
}

/* ----- Setpoint Section ----- */

.setpoint-section {
    max-width: 1300px;
    margin: 15px auto 0;
    padding: 0 28px 10px;
    animation: fade-in-up 0.6s ease 0.3s both;
}

.setpoint-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.setpoint-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-bright), var(--cyan-accent));
}

.setpoint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.setpoint-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(29,78,216,0.3), rgba(6,182,212,0.2));
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.setpoint-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.setpoint-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.setpoint-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setpoint-meta {
    margin-top: 10px;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.btn-setpoint {
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(29, 78, 216, 0.35);
    white-space: nowrap;
}

.btn-setpoint:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.5);
}

.btn-setpoint:active {
    transform: scale(0.97);
    box-shadow: none;
}

.setpoint-input {
    flex: 1;
    min-width: 180px;
    padding: 11px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(100,160,255,0.25);
    border-radius: 10px;
    color: #f0f6ff;
    font-size: 14px;
    font-family: "Open Sauce One", sans-serif;
    outline: none;
    transition: all .25s ease;
}

.setpoint-input:hover {
    border-color: rgba(59,130,246,0.45);
    background: rgba(255,255,255,0.08);
}

.setpoint-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.setpoint-input::placeholder {
    color: rgba(200,220,255,0.45);
}

/* Spinner custom */

.setpoint-input::-webkit-inner-spin-button,
.setpoint-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 32px;
    cursor: pointer;
    filter:
        invert(74%)
        sepia(26%)
        saturate(1050%)
        hue-rotate(180deg);
}

/* Success toast */

.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transform: translateY(16px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.toast-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

/* Navbar logout button */

.btn-logout {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: red;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid red;
    background: rgba(239, 68, 68, 0.08);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: red;
    color: red;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.15);
    transform: translateY(-1px);
}

.btn-logout:active {
    transform: scale(0.97);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-username {
    font-size: 13px;
    color: var(--blue-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border-radius: 50%;
    border: 1px solid rgba(96,165,250,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

/* ----- Live pulse dot ----- */

.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #4ade80;
    font-weight: 500;
}

.live-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: live-pulse 1.5s ease infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
    50%       { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

/* ================================================================
                        SETPOINT HISTORY
================================================================ */

/* ----- Section ----- */

.setpoint-history-section {
    max-width: 1000px;
    margin: 15px auto 0;
    padding: 0 28px 10px;
    animation: fade-in-up 0.6s ease 0.35s both;
}

.setpoint-history-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.setpoint-history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
}

.setpoint-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.setpoint-history-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setpoint-history-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ----- Table ----- */

.setpoint-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.setpoint-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.setpoint-history-table thead {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--glass-border);
}

.setpoint-history-table th {
    padding: 12px 16px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.setpoint-history-table td {
    padding: 12px 16px;
    text-align: center;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap;
    transition: var(--transition);
}

.setpoint-history-table td:first-child {
    color: var(--text-muted);
    font-size: 12px;
}

.setpoint-history-table tbody tr {
    transition: var(--transition);
}

.setpoint-history-table tbody tr:hover td {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.setpoint-history-table tbody tr:last-child td {
    border-bottom: none;
}

/* ----- Pagination ----- */

.setpoint-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.setpoint-pg-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: "Open Sauce One", sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.setpoint-pg-btn:hover:not(:disabled) {
    background: var(--glass-hover);
    border-color: rgba(59,130,246,0.4);
    color: var(--text-primary);
}

.setpoint-pg-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.setpoint-pg-active {
    background:linear-gradient(135deg, #1d4ed8, #0e7490);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow:
        0 3px 12px rgba(29,78,216,0.4);
}

/* ================================================================
                                MONITORING HISTORY
   ================================================================ */

/* ----- Recap Section ----- */

.recap-section {
    max-width: 1000px;
    margin: 15px auto 0;
    padding: 0 28px 10px;
    animation: fade-in-up 0.6s ease 0.35s both;
}

.recap-card{
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.recap-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
}

.recap-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.recap-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.recap-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.recap-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ----- Filter Row ----- */

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}

.filter-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.filter-input,
.filter-select {
    padding: 9px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: "Open Sauce One", sans-serif;
    outline: none;
    transition: var(--transition);
}

.filter-input:hover,
.filter-select:hover {
    border-color: rgba(59,130,246,0.4);
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px var(--input-focus);
}

.filter-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6) sepia(1) saturate(3) hue-rotate(190deg);
    cursor: pointer;
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}

.filter-select option {
    background: #0d1b3e;
    color: var(--text-primary);
}

.filter-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-self: flex-end;
}

.btn-filter-apply {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(29,78,216,0.3);
}

.btn-filter-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29,78,216,0.5);
}

.btn-filter-apply:active { transform: scale(0.97); }

.btn-filter-reset {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-filter-reset:hover {
    border-color: rgba(59,130,246,0.4);
    color: var(--text-primary);
}

/* ----- Export Button ----- */

.btn-export {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #059669, #0d9488);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(5,150,105,0.3);
    position: relative;
    overflow: hidden;
}

.btn-export:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5,150,105,0.5);
    background: linear-gradient(135deg, #10b981, #14b8a6);
}

.btn-export:active { transform: scale(0.97); }

/* ----- Print Button ----- */

.btn-print {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(220,38,38,0.3);
    position: relative;
    overflow: hidden;
}

.btn-print:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(220,38,38,0.5);
}

.btn-print:active {
    transform: scale(0.97);
}

/* ----- Print Chart Button ----- */

.btn-print-chart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 2px 6px rgba(109, 40, 217, 0.35);
}

.btn-print-chart:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.45);
}

.btn-print-chart:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(109, 40, 217, 0.35);
}

.btn-print-chart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-print-chart i {
    font-size: 14px;
}

.recap-header-right{
    display:flex;
    align-items:center;
    gap:10px;
}

/* ----- Status Badges ----- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-normal {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}
.badge-normal::before { background: #4ade80; }

.badge-kering {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}
.badge-kering::before { background: #fbbf24; }

.badge-lembap {
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}
.badge-lembap::before { background: #60a5fa; }

/* ----- Data Table ----- */

.table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.recap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.recap-table thead {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--glass-border);
}

.recap-table th {
    padding: 12px 16px;
    text-align: center;      /* dari left, jadi center */
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.recap-table td {
    padding: 12px 16px;
    text-align: center;      /* baru ditambahkan, sebelumnya gak ada sama sekali */
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap;
    transition: var(--transition);
}

.recap-table td:first-child { color: var(--text-muted); font-size: 12px; }
.recap-table td.td-temp     { color: #fca5a5; font-family: "Open Sauce One", sans-serif; font-weight: 500; }
.recap-table td.td-hum      { color: #93c5fd; font-family: "Open Sauce One", sans-serif; font-weight: 500; }
.recap-table td.td-fan      { color: #6ee7b7; font-family: "Open Sauce One", sans-serif; font-weight: 500; }
.recap-table td.td-peltier  { color: #c4b5fd; font-family: "Open Sauce One", sans-serif; font-weight: 500; }

.recap-table tbody tr {
    /* gak perlu transition di sini sama sekali */
}

.recap-table tbody tr:hover td {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    transition: background-color 0.25s ease, color 0.25s ease;  /* transition HANYA saat hover */
}

.recap-table tbody tr:last-child td { border-bottom: none; }

/* ----- Empty & Loading States ----- */

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.8;
}

.table-count {
    font-size: 12px;
    color: var(--text-muted);
}

.table-count .badge {
    margin: 2px;
}

.table-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.table-empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.table-loading {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59,130,246,0.3);
    border-top-color: var(--blue-bright);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pagination-wrap {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; flex-wrap: wrap; margin-top: 16px;
}

.pg-btn {
    min-width: 34px; height: 34px; padding: 0 10px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 8px; color: var(--text-secondary); font-size: 13px;
    font-family: "Open Sauce One", sans-serif; cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center;
}

.pg-btn:hover:not(:disabled) {
    background: var(--glass-hover); border-color: rgba(59,130,246,0.4);
    color: var(--text-primary);
}

.pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.pg-btn.pg-active {
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border-color: transparent; color: #fff; font-weight: 600;
    box-shadow: 0 3px 12px rgba(29,78,216,0.4);
}

.pg-dots { color: var(--text-muted); font-size: 13px; padding: 0 2px; line-height: 34px; }

.status-legend{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.legend-item{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:var(--text-muted);
}

/* ==================================================================
                        MOBILE (ANDROID / IPHONE)
   ================================================================== */

   @media (max-width: 768px) {
    
    /* ===== GLOBAL ===== */
    html,
    body {
        overflow-x: hidden;
    }

    .page-wrapper {
        min-height: 25vh;
    }

    /* ===== NAVBAR ===== */
    .navbar {
        padding: 12px 16px;
    }

    .navbar-logo {
        gap: 8px;
    }

    .navbar-logo img {
        height: 34px;
        width: auto;
        max-width: 120px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .navbar-logo-placeholder {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }

    .navbar-logo-text .inst-name {
        font-size: 10px;
    }

    .navbar-logo-text .inst-sub {
        font-size: 8px;
    }

    .navbar-right {
        gap: 6px;
    }

    .btn-nav {
        padding: 7px 10px;
        font-size: 10px;
        border-radius: 7px;
        gap: 4px;
    }

    /* ===== LOGIN PAGE ===== */
    .login-page {
        padding: 85px 16px 24px;
        min-height: 100dvh;
    }

    .login-container {
        max-width: 100%;
        gap: 12px;
    }

    /* ===== PROJECT IDENTITY ===== */
    .project-identity {
        margin-bottom: 0;
    }

    .project-logo-wrap {
        margin-bottom: -8px;
    }

    .project-logo-wrap img {
        max-width: 180px;
        max-height: 180px;
        margin-bottom: 8px;
    }

    .project-name {
        font-size: 24px;
        line-height: 1.15;
    }

    .project-tagline {
        font-size: 11px;
        padding: 0 10px;
    }

    /* ===== GLASS CARD ===== */
    .glass-card {
        border-radius: 20px;
        padding: 24px 20px;
    }

    .card-title {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .card-subtitle {
        font-size: 12px;
        margin-bottom: 24px;
    }

    /* ===== FORM ===== */
    .form-group {
        margin-bottom: 16px;
    }

    .form-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .input-icon {
        left: 12px;
        font-size: 15px;
    }

    .form-input {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
        border-radius: 10px;
    }

    .toggle-password {
        right: 12px;
        font-size: 15px;
    }

    /* ===== ALERT ===== */
    .alert {
        padding: 10px 12px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    /* ===== BUTTON ===== */
    .btn-submit {
        padding: 13px;
        font-size: 14px;
        border-radius: 10px;
        margin-top: 4px;
    }

    .btn-spinner {
        width: 16px;
        height: 16px;
    }

    /* ===== FOOTER ===== */
    .card-divider {
        margin: 20px 0 14px;
    }

    .card-footer-text {
        font-size: 10px;
        line-height: 1.5;
        padding: 0 8px;
    }

    /* ===== ABOUT PAGE ===== */
    .about-page {
        padding-top: 65px;
    }

    /* ===== ABOUT HERO ===== */
    .about-hero {
        padding: 32px 16px 40px;
    }

    .about-badge {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    .about-title {
        font-size: 30px;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .about-subtitle {
        font-size: 13px;
        line-height: 1.6;
        padding: 0 8px;
        max-width: 100%;
    }

    .about-project-logo {
        margin: 14px 0 10px;
    }

    .about-project-logo img {
        width: 180px;
        max-width: 80%;
        height: auto;
    }

    /* ===== ABOUT SECTION ===== */
    .about-section,
    .contact-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .about-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .contact-section {
        padding-top: 0;
        padding-bottom: 50px;
    }

    .section-header {
        margin-bottom: 24px;
    }

    .section-tag {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .section-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .section-desc {
        font-size: 13px;
        line-height: 1.7;
        margin-top: 10px;
    }

    /* ===== ABOUT FEATURE ===== */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 12px;
    }

    .feature-icon i {
        font-size: 17px;
        color: #ffffff; 
    }

    .feature-title {
        font-size: 14px;
    }

    .feature-desc {
        font-size: 12px;
    }

    /* ===== ABOUT GALLERY ===== */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gallery-img,
    .gallery-placeholder {
        height: 190px;
    }

    .gallery-placeholder-icon {
        font-size: 28px;
    }

    .gallery-caption {
        padding: 14px;
    }

    .gallery-caption-title {
        font-size: 13px;
    }

    .gallery-caption-sub {
        font-size: 11px;
    }

    /* ===== ABOUT TEAM ===== */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .team-card {
        padding: 22px 16px;
    }

    .team-avatar {
        width: 64px;
        height: 64px;
        font-size: 22px;
        margin-bottom: 12px;
    }

    .team-name {
        font-size: 13px;
    }

    .team-nim {
        font-size: 11px;
    }

    .team-role {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* ===== ABOUT SUPERVISOR ===== */
    .supervisor-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 8px;
    }

    .supervisor-card {
        padding: 18px;
        gap: 12px;
    }

    .supervisor-avatar {
        width: 48px;
        height: 48px;
        font-size: 17px;
    }

    .supervisor-info .title {
        font-size: 10px;
    }

    .supervisor-info .name {
        font-size: 13px;
    }

    .supervisor-info .nip {
        font-size: 11px;
    }

    /* ===== ABOUT CONTACT ===== */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-card {
        padding: 16px;
        gap: 12px;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .contact-details .label {
        font-size: 10px;
    }

    .contact-details .value {
        font-size: 13px;
        word-break: break-word;
    }

    /* ===== ABOUT DIVIDER ===== */
    .section-divider {
        padding: 0 16px;
    }

    /* ===== ABOUT FOOTER ===== */
    .footer {
        padding: 18px 16px;
    }

    .footer-text {
        font-size: 8px;
        line-height: 1.7;
    }

    /* ===== ABOUT SCROLLBAR ===== */
    ::-webkit-scrollbar {
        width: 4px;
    }

    /* ===== NAVBAR ===== */
    .navbar {
        padding: 12px 16px;
    }

    .navbar-logo {
        gap: 8px;
    }

    .navbar-logo img {
        height: 34px;
        width: auto;
        max-width: 120px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .navbar-logo-placeholder {
        width: 34px;
        height: 34px;
    }

    .navbar-logo-text .inst-name {
        font-size: 10px;
    }

    .navbar-logo-text .inst-sub {
        font-size: 8px;
    }

    .navbar-user {
        gap: 6px;
    }

    .navbar-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .navbar-username {
        display: none;
    }

    .btn-logout {
        padding: 7px 10px;
        font-size: 10px;
        gap: 4px;
    }

    /* ===== DASHBOARD PAGE ===== */
    .dashboard-page {
        padding-top: 70px;
    }

    /* ===== DASHBOARD GREETING ===== */
    .greeting-bar {
        padding: 18px 16px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .greeting-name {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .greeting-sub {
        font-size: 12px;
    }

    .greeting-right {
        text-align: left;
        width: 100%;
    }

    .clock-time {
        font-size: 30px;
    }

    .clock-date {
        font-size: 12px;
    }

    .clock-tz {
        font-size: 10px;
        padding: 2px 7px;
    }

    .uvc-info{
        margin-top:8px;
        text-align:left;
    }

    .uvc-label{
        font-size:12px;
    }

    .uvc-on,
    .uvc-off{
        font-size:12px;
    }

    .uvc-schedule{
        margin-top:3px;
        font-size:10px;
        line-height:1.4;
    }

    .greeting-logo {
        margin-top: 10px;
        justify-content: center;
    }

    .greeting-logo img {
        width: 250px;
    }

    /* ===== DASHBOARD METRIC ===== */
    .metrics-row {
        padding: 0 16px;
        margin-top: 20px;
        gap: 12px;
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-card {
        padding: 16px 14px;
        gap: 10px;
        border-radius: 14px;
    }

    .metric-icon-wrap {
        width: 42px;
        height: 42px;
        font-size: 18px;
        border-radius: 10px;
    }

    .metric-label {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .metric-value {
        font-size: 22px;
    }

    .metric-unit {
        font-size: 10px;
    }

    .metric-range {
        font-size: 10px;
        color: var(--text-muted);
        margin-top: 2px;
        margin-bottom: 2px;
    }

    .metric-status {
        font-size: 10px;
        margin-top: 3px;
    }

    .status-offline{
        display:inline-flex;
        align-items:center;
        gap:5px;
        padding:3px 8px;
        font-size:9px;
        font-weight:600;
        letter-spacing:.1px;
        color:#ff8a8a;
        background:rgba(255,70,70,.08);
        border:1px solid rgba(255,70,70,.25);
        border-radius:999px;
        animation:offlinePulse 2s infinite;
    }

    /* ===== CHART ===== */
    .charts-section {
        padding: 0 16px 8px;
        margin-top: 20px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-card {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .chart-header {
        margin-bottom: 10px;
    }

    .chart-title {
        font-size: 12px;
        gap: 6px;
    }

    .chart-badge {
        font-size: 10px;
        padding: 2px 7px;
    }

    .chart-canvas-wrap {
        height: 180px;
    }

    /* ===== SETPOINT ===== */
    .setpoint-section {
        padding: 0 16px 20px;
        margin-top: 15px;
    }

    .setpoint-card {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .setpoint-header {
        gap: 10px;
        margin-bottom: 16px;
    }

    .setpoint-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .setpoint-title {
        font-size: 14px;
    }

    .setpoint-sub {
        font-size: 11px;
    }

    .setpoint-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .setpoint-input {
        width: 100%;
        min-width: 100%;
        font-size: 14px;
    }

    .btn-setpoint {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 13px;
    }

    .setpoint-meta {
        font-size: 11px;
        margin-top: 12px;
        padding: 7px;
        line-height: 1.5;
    }

    /* ===== TOAST ===== */
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        padding: 12px 14px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }

    /* ===== LIVE INDICATOR ===== */
    .live-dot {
        font-size: 10px;
    }

    .live-dot::before {
        width: 6px;
        height: 6px;
    }

    /* ===== SETPOINT HISTORY ===== */
    .setpoint-history-section {
        padding: 0 16px 20px;
        margin-top: 3px;
    }
    
    .setpoint-history-card {
        padding: 25px;
        border-radius: 14px;
    }
    
    .setpoint-history-header {
        gap: 10px;
        margin-bottom: 14px;
    }
    
    .setpoint-history-title {
        font-size: 14px;
    }
    
    .setpoint-history-sub {
        font-size: 11px;
    }
    
    .setpoint-history-table {
        font-size: 11px;
    }
    
    .setpoint-history-table th {
        padding: 10px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }
    
    .setpoint-history-table td {
        padding: 10px;
        font-size: 11px;
    }
    
    .setpoint-history-table td:first-child {
        font-size: 10px;
    }
    
    /* ===== SETPOINT HISTORY PAGINATION ===== */
    .setpoint-pagination-wrap {
        gap: 5px;
        margin-top: 10px;
    }
    
    .setpoint-pg-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }

    /* ===== MONITORING HISTORY ===== */
    .recap-section {
        width: 100%;
        max-width: 100%;
        padding: 0 12px 10px;
        box-sizing: border-box;
        margin-top: 5px;
    }

    .recap-card {
        width: 100%;
        max-width: 100%;
        padding: 14px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .recap-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .recap-title {
        font-size: 14px;
    }

    .recap-sub {
        font-size: 11px;
    }

    .recap-header-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .btn-export,
    .btn-print,
    .btn-print-chart {
        width: 100%;
        padding: 10px;
        justify-content: left;
        font-size: 11px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .filter-group {
        width: 100%;
        min-width: unset;
        flex: none;
    }

    .filter-label {
        font-size: 10px;
    }

    .filter-input,
    .filter-select {
        width: 100%;
        box-sizing: border-box;
        font-size: 11px;
    }

    .filter-input[type="date"] {
        width: 100%;
        min-width: 100%;
    }

    .filter-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .btn-filter-apply,
    .btn-filter-reset {
        width: 100%;
        justify-content: center;
        font-size: 11px;
    }

    .table-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .recap-table {
        width: max-content;
        min-width: 500px;
    }

    .recap-table th {
        font-size: 11px;
    }

    .recap-table td {
        font-size: 11px;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .table-count {
        font-size: 10px;
        line-height: 1.6;
    }

    .badge {
        font-size: 10px;
    }

    /* ===== MONITORING HISTORY PAGINATION ===== */
    .pagination-wrap {
        gap: 4px;
    }

    .pg-btn {
        min-width: 30px;
        height: 30px;
        font-size: 10px;
    }
}

.mobile-text {
    display: none;
}

@media (max-width: 768px) {

    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }

}