/* Global Styles */
:root {
    --primary-color: #e50914;
    /* Red Cross Red */
    --primary-hover: #b8070f;
    --secondary-color: #2c3e50;
    --background-color: #f0f2f5;
    --text-color: #333;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sidebar-width: 250px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* User Body Specific */
.user-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.main-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
}

.logo-img {
    width: 90px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.header-text h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.header-text h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 400;
}

/* Auth Pages */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #e50914 0%, #2c3e50 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.login-container h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Admin Styles (Kept from previous) */
.admin-body {
    background-color: #f3f4f6;
    overflow-x: hidden;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.3s;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1rem;
    text-align: center;
    background-color: #1a252f;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: 0.2s;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background-color: #34495e;
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu li a i {
    width: 25px;
    margin-right: 10px;
}

.text-danger {
    color: #ff6b6b !important;
}

.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card.blue .icon {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.stat-card.green .icon {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
}

.stat-card.purple .icon {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

.stat-card.pink .icon {
    background: linear-gradient(45deg, #e91e63, #c2185b);
}

.stat-card .info h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
}

.stat-card .info p {
    margin: 5px 0 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Control Panel */
.control-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
}

.status-text {
    font-weight: bold;
}

.status-text.open {
    color: #27ae60;
}

.status-text.closed {
    color: #c0392b;
}

.control-actions {
    display: flex;
    gap: 10px;
}

.inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}


.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.styled-table thead tr {
    background-color: var(--secondary-color);
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--secondary-color);
}

.styled-table tbody tr:hover {
    background-color: #f1f1f1;
}

.styled-table th a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Badges & Buttons */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
}

.badge.blue {
    background-color: #3498db;
}

.badge.pink {
    background-color: #e91e63;
}

.size-badge {
    background-color: #ecf0f1;
    color: #2c3e50;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.2s;
}

.btn-icon.delete {
    background-color: #ffebee;
    color: #c0392b;
}

.btn-icon.delete:hover {
    background-color: #c0392b;
    color: white;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Buttons & Forms (Generic) */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    transition: background 0.3s;
}

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

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 200px;
}

.search-box button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 8px;
    cursor: pointer;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar span,
    .sidebar-header span {
        display: none;
    }

    .sidebar-menu li a {
        justify-content: center;
        padding: 1rem;
    }

    .sidebar-menu li a i {
        margin: 0;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .control-body {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.2s;
    background: white;
}

.page-link:hover {
    background-color: #f1f1f1;
    border-color: #ccc;
}

.page-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-info {
    text-align: center;
    margin-top: 0.8rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Frontend Content Card */
.content-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
}

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

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: #7f8c8d;
    margin: 0;
}

.modern-form .input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.modern-form input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: var(--transition);
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.modern-form input:focus {
    border-color: var(--primary-color);
    background-color: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.1);
}

.input-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 1.2rem;
}

.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

.spinner {
    text-align: center;
    color: var(--secondary-color);
    margin-top: 1rem;
}

/* Selection Cards */
.selection-section {
    margin-bottom: 2rem;
    transition: var(--transition);
}

.selection-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.section-label {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--secondary-color);
}

.gender-options {
    display: flex;
    gap: 1.5rem;
}

.gender-card {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.gender-card:hover {
    border-color: #bdc3c7;
    transform: translateY(-3px);
}

.gender-card i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
    color: #95a5a6;
    transition: var(--transition);
}

.gender-card span {
    font-weight: 500;
    color: #7f8c8d;
}

.gender-card.active {
    border-color: var(--primary-color);
    background-color: #fff0f0;
}

.gender-card.active i {
    color: var(--primary-color);
}

.gender-card.active span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.size-box {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.size-box:hover {
    border-color: #bdc3c7;
}

.size-box.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

/* Size Chart */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.size-chart-collapse {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #eee;
}

.compact th,
.compact td {
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Messages */
.error-message {
    background: #ffe6e6;
    color: #c0392b;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #c0392b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-icon {
    font-size: 4rem;
    color: #2ecc71;
    margin-bottom: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-buttons button {
    flex: 1;
}

/* Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .gender-options {
        flex-direction: column;
        gap: 1rem;
    }

    .size-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-card {
        padding: 1.5rem;
    }
}