/*
Theme Name: Custom Login Theme
Author: Wong Ing Sing
Description: A minimal WordPress theme with custom login, register, and dashboard templates.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-login-theme
*/

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
	  --green: #3cb371;
    --accent: #f72585;
    --light: #f8f9ff;
    --dark: #2b2d42;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #e63946;
    --gray: #8d99ae;
    --light-gray: #edf2f4;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --primary-dark: #3a0ca3;
}

/* ========== Global Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.dash-body {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;

}

/* ========== LOGIN PAGE STYLES ========== */
.login-container {
    width: 100%;
    max-width: 450px;
    margin: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.login-copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.logo {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
    height: auto;
    overflow: visible;
}

.logo-icon {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
}


.logo h1 {
    font-size: 26px;
    color: #333;
    font-weight: 700;
}

.tagline {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    max-width: 300px;
    line-height: 1.5;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 14px 14px 42px;
    border: 2px solid #e6e9f0;
    border-radius: 10px;
    font-size: 15px;
    background: #fafbff;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
    background: white;
}

.form-group input.error {
    border-color: #e63946;
}

.form-group input.valid {
    border-color: #2a9d8f;
}

.error-message {
    color: #e63946;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    text-align: left;
    display: none;
}

/* Password Requirements */
.requirements {
    background: var(--light);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    text-align: left;
}

.requirements h3 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.requirements h3 i {
    margin-right: 8px;
}

.requirements ul {
    list-style: none;
    padding-left: 10px;
}

.requirements li {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
}

.requirements li i {
    margin-right: 8px;
    margin-top: 4px;
    color: #777;
    font-size: 12px;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 25px;
}

.remember input {
    margin-right: 8px;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--secondary);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.register-link {
    color: #666;
    font-size: 15px;
    margin-top: 25px;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Features */
.features-container {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 25px;
}

.features-title {
    font-size: 16px;
    color: #444;
    font-weight: 600;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.features-title i {
    margin-right: 10px;
    color: var(--primary);
}

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

.feature-item {
    background: var(--light);
    padding: 14px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.feature-item:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.feature-item i {
    margin-right: 10px;
    color: var(--primary);
}

/* ====== Dashboard STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
}

/* ====== LAYOUT ====== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ====== SIDEBAR ====== */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--light-gray);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    transition: all 0.3s;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
}

.logo-icon {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
}

.brand-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--gray);
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: var(--light);
    color: var(--primary);
}

.nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* ====== MAIN CONTENT ====== */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    transition: margin 0.3s;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.page-title p {
    color: var(--gray);
    font-size: 0.95rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--light-gray);
    border-radius: 30px;
    min-width: 250px;
    font-size: 0.95rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

.header-user-menu {
    position: relative;
    display: inline-block;
}

.header-avatar-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.header-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #f9fafb;
    font-size: 14px;
}

.header-menu-dropdown {
    position: absolute;
    right: 0;
    top: 42px;
    min-width: 160px;
    background: #0b1120;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.55);
    padding: 8px 0;
    display: none;
    z-index: 1100;
}

.header-menu-dropdown a {
    display: block;
    padding: 8px 14px;
    color: #e5e7eb;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.header-menu-dropdown a:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #f9fafb;
}

/* layout */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* hide the native checkbox but keep it focusable */
.checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0; /* Hide the checkbox */
    width: 0;
    height: 0;
}

/* label as the visual toggle */
.checkbox-group label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 3rem; /* Make space for the toggle */
    margin: 0.2rem 0;
    color: #555;
    font-size: 1rem;
    transition: color .2s;
}

/* Change label color on hover */
.checkbox-group label:hover {
    color: #000;
}

/* track */
.checkbox-group label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 26px;
    background: #e0e0e0;
    border-radius: 30px;
    transition: all .3s ease;
}

/* knob (the circle) */
.checkbox-group label::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all .3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

/* Checked state: when input is checked, move the knob */
.checkbox-group input[type="checkbox"]:checked + label::before {
    background: #4CAF50;
}

.checkbox-group input[type="checkbox"]:checked + label::after {
    left: calc(50px - 22px); /* Move knob to the right */
}

/* Focus ring on track */
.checkbox-group input[type="checkbox"]:focus + label::before {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, .2);
}

/* Style the category label text */
.checkbox-group label {
    font-size: 1rem;
    margin-left: 10px; /* Space between the toggle switch and text */
}

.toggle-switch .slider {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    background-color: #ccc;
    border-radius: 34px;
    transition: background-color 0.3s;
}

.toggle-switch input[type="checkbox"]:checked + .slider {
    background-color: #4CAF50; /* Green when checked */
}

.toggle-switch .slider:before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    left: 4px;
    top: 4px;
    background-color: white;
    transition: 0.3s;
}

.toggle-switch input[type="checkbox"]:checked + .slider:before {
    transform: translateX(26px); /* Move the circle to the right when checked */
}
/* tiny pop animation on knob */
@keyframes slide {
    0% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(1.1);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

.checkbox-group input[type="checkbox"]:checked+label::after {
    animation: slide .3s ease;
}


/* Dashboard Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.stat-icon.blue {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.stat-icon.green {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.stat-icon.purple {
    background: rgba(114, 9, 183, 0.1);
    color: var(--secondary);
}

.stat-icon.pink {
    background: rgba(247, 37, 133, 0.1);
    color: var(--accent);
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Content Sections */
.content-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-action {
    color: var(--primary);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

.section-action:hover {
    text-decoration: underline;
}

/* Products Table */
.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--light);
    color: var(--gray);
    font-weight: 500;
    font-size: 0.9rem;
}

.products-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

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

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.product-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.product-category {
    color: var(--gray);
    font-size: 0.85rem;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.active {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.status.pending {
    background: rgba(248, 150, 30, 0.1);
    color: var(--warning);
}

.status.draft {
    background: rgba(139, 140, 154, 0.1);
    color: var(--gray);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}
.btn-secondary {
    background: var(--green);
    color: white;
}
.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--light-gray);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light);
}

/* Recent Activity */
.activity-list {
    list-style: none;
}

.activity-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Table container */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

/* Contact: safe horizontal layout + hard reset */
.contact-section .social-links {
    display: flex !important;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.contact-section .social-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    line-height: 1.3;
    white-space: nowrap;
}

/* THIS stops the overlap: kill any absolute/float rules applied elsewhere */
.contact-section .social-link i {
    position: static !important;
    float: none !important;
    inset: auto !important;
    /* resets top/right/bottom/left */
    transform: none !important;
    margin: 0 !important;
    display: inline-block !important;
    font-size: 18px;
    line-height: 1;
}

/* Base table styles */
.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    /* allows horizontal scroll on smaller screens */
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.products-table thead {
    background-color: #f2f2f2;
}

.products-table th,
.products-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
}

.products-table tr:hover {
    background-color: #f9f9f9;
}

.products-table td .btn {
    margin-right: 5px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: 40px 0;
    font-size: 14px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-col {
    flex: 1 1 1;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 16px;
    position: relative;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s;
}

.footer-social-links a:hover {
    background: var(--gold);
    color: var(--dark-blue);
    transform: translateY(-3px);
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b7c3;
    font-size: 0.9rem;
}

.footer-inline-link,
.footer-inline-link:visited {
    color: inherit;
    text-decoration: underline;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-inline-link:hover {
    color: #ffffff;
    background-color: rgba(148, 163, 184, 0.35);
}
    color: var(--medium-gray);
}

/* Responsive fixes */
@media (max-width: 768px) {
    .products-table {
        min-width: 600px;
    }

    .table-responsive {
        margin-bottom: 20px;
    }

    .products-table th,
    .products-table td {
        font-size: 14px;
        padding: 10px 12px;
    }
}


/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 90;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 6px;
        padding: 0.5rem 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-box input {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }
}
