:root {
    --auth-blur: 40px;
    --auth-opacity: 0;
    --auth-pointer: none;
    --border-color: #e0e6ed;
    --bg-light: #f8f9fa;
    --text-main: #2d3436;
}

html,
body {
    transition: all 0.5s ease;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    background-color: #f4f7f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 {
    text-align: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    color: var(--text-main);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.backbtn {
    display: block;
    margin-bottom: 10px;
}

.Sections {
    margin: 0 0 25px 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.Sections:hover {
    border-color: #cbd5e0;
}

.manage {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f2f6;
}

.manage h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    flex-grow: 1;
}

.output {
    min-height: 50px;
    max-height: 450px;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: 10px;
    border: 1px inset rgba(0,0,0,0.02);
}

.output::-webkit-scrollbar {
    width: 6px;
}

.output::-webkit-scrollbar-thumb {
    background: #dcdde1;
    border-radius: 10px;
}

.input {
    width: 220px;
    height: 38px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin: 0;
}

.input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.button,
.button-hide {
    min-width: 90px;
    height: 38px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    margin: 0;
}

.button {
    background-color: #f1f2f6;
    color: #2f3542;
}

.button:hover {
    background-color: #dfe4ea;
}

.button-hide {
    display: none;
    color: white;
}

.btn-complete { background-color: #28a745; }
.btn-complete:hover { background-color: #218838; }

.btn-delete { 
    background-color: #ff4d4d !important; 
    color: white !important;
    border: none !important;
    padding: 0 20px !important;
    height: 38px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    display: none;
    align-items: center;
    justify-content: center;
}

.shipping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.order-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid #edf2f7;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.order-card-body p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #4a5568;
}

.items-list-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-top: 5px;
}

.items-list-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.items-list-container li {
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.shipping-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 5;
}

.btn-action-delivery {
    background: #3182ce;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
}

.btn-action-delivery:hover { background: #2b6cb0; }

.btn-delete:hover { 
    background-color: #cc0000 !important; 
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(204, 0, 0, 0.3) !important;
}

.btn-delete:active {
    transform: translateY(0) !important;
}

.info-col { display: flex; flex-direction: column; }

.info-col label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #b2bec3;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.email-section { flex: 1; min-width: 150px; }
.email-text { font-weight: 600; color: #2d3436; font-size: 0.9rem; }

.products-section {
    flex: 2;
    border-left: 2px solid #f1f2f6;
    padding-left: 15px;
}

.product-item { font-size: 0.85rem; margin-bottom: 2px; color: #636e72; }

.status-badge {
    background: #fff3e0;
    color: #e67e22;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.order-checkbox { width: 18px; height: 18px; cursor: pointer; }

.admin-shipping-wrapper {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.shipping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.shipping-stats { display: flex; gap: 15px; }

.stat-card {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
}

.stat-card.pending { border-left: 4px solid #f1c40f; }

.border-packing { border-left: 5px solid #f1c40f; }
.border-delivered { border-left: 5px solid #28a745; }
.bg-packing { background: #fff3cd; color: #856404; }
.bg-delivered { background: #d4edda; color: #155724; }

#productModal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99999 !important;
    display: none;
}

#productModal .modal-content {
    background-color: white !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

#productModal input,
#productModal textarea {
    color: #000 !important;
    background-color: #fff !important;
    border: 1px solid #dee2e6;
}

.button-show-anim {
    display: inline-flex !important;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .manage { flex-direction: column; align-items: stretch; }
    .input { width: 100%; }
    .order-card { flex-direction: column; align-items: flex-start; }
    .products-section { border-left: none; border-top: 1px dashed #eee; padding: 10px 0 0 0; width: 100%; }
}