/* ====== AUTH & LANDING PAGES (index.html, login.html) ====== */
body.auth-page {
    min-height: 100vh;
    background: #f8fafc;
    /* Light Blue-Grey Background */
    background-image:
        radial-gradient(at 0% 0%, hsla(210, 100%, 96%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(217, 100%, 95%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 100%, 96%, 1) 0, transparent 50%);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    color: #334155;
    /* Dark Slate Text */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Shapes (Softer colors for light mode) */
.shape {
    position: fixed;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #e0e7ff;
    /* Soft Indigo */
    border-radius: 50%;
}

.shape-2 {
    bottom: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: #fae8ff;
    /* Soft Fuchsia */
    border-radius: 50%;
}

/* ====== MAIN CONTAINER (Homepage) ====== */
.homepage {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.7);
    /* White Glass */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(16px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    z-index: 10;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #0f172a;
    /* Slate 900 */
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: #64748b;
    /* Slate 500 */
    margin-bottom: 50px;
    font-weight: 400;
}

/* ====== GRID SYSTEM ====== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 0 auto;
}

/* ====== CARD STYLES ====== */
.dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 20px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.dashboard-card:hover {
    transform: translateY(-10px);
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.08);
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Icons */
.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

/* Icon Colors (Keep gradient text) */
.i-sukien {
    background-image: linear-gradient(135deg, #ef4444, #dc2626);
}

.i-sukien-lam {
    background-image: linear-gradient(135deg, #f97316, #ea580c);
}

.i-phunu {
    background-image: linear-gradient(135deg, #d946ef, #c026d3);
}

.i-mtt {
    background-image: linear-gradient(135deg, #3b82f6, #2563eb);
}

.i-ads {
    background-image: linear-gradient(135deg, #eab308, #ca8a04);
}

.i-compare {
    background-image: linear-gradient(135deg, #22c55e, #16a34a);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    /* Slate 800 */
    margin-bottom: 8px;
}

.card-description {
    color: #64748b;
    /* Slate 500 */
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ====== FOOTER & BUTTONS ====== */
footer {
    margin-top: 50px;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

/* Floating Buttons */
.float-btn {
    position: fixed;
    z-index: 100;
    padding: 10px 20px;
    width: auto;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: white;
    color: #475569;
}

#logoutBtn {
    top: 30px;
    right: 30px;
}

#logoutBtn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: translateY(-2px);
}

#adminBtn {
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 25px;
}

#adminBtn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* ====== LOGIN SPECIFIC ====== */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
    margin: 20px;
}

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

.logo-wrapper {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.logo-wrapper img {
    max-width: 70px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #475569;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i.icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: 0.3s;
}

input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #1e293b;
    font-size: 14px;
    transition: all 0.3s ease;
}

input::placeholder {
    color: #94a3b8;
}

input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

input:focus+i.icon {
    color: #3b82f6;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.toggle-password:hover {
    color: #334155;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    filter: brightness(1.05);
}

button:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.footer-text {
    text-align: center;
    margin-top: 25px;
    color: #64748b;
    font-size: 13px;
}

.footer-text a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.footer-text a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .homepage {
        padding: 40px 30px;
    }
}

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

    .homepage {
        padding: 30px 20px;
        margin-top: 60px;
    }

    .dashboard-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        gap: 20px;
        padding: 20px;
        min-height: auto;
    }

    .card-icon {
        margin-bottom: 0;
        font-size: 2.5rem;
    }

    .card-content {
        display: flex;
        flex-direction: column;
    }

    .login-container {
        padding: 30px 25px;
    }
}