:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #fbbf24;
    --accent-dark: #d97706;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #cbd5e1;

    /* Status Colors */
    --color-pending: #fbbf24;
    --color-approved: #10b981;
    --color-shipped: #3b82f6;
    --color-unreachable: #f97316;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 290px;
    background: var(--primary);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow-y: auto;
}

.sidebar-brand {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 35px;
    padding-left: 10px;
}

.sidebar-brand span {
    color: var(--accent);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
}

.menu-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.menu-item a:hover, .menu-item.active a {
    background: rgba(255,255,255,0.08);
    color: white;
}

.menu-item.active a {
    border-left: 4px solid var(--accent);
    background: rgba(255,255,255,0.1);
    padding-left: 12px;
}

.badge-count {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.badge-count.pending { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.badge-count.approved { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-count.shipped { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-count.unreachable { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.badge-count.canceled { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.sidebar-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main Content Area */
.main-content {
    margin-left: 290px;
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

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

.main-header h1 {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--primary);
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 5px;
    font-weight: 500;
}

.date-badge {
    background: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 25px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s;
}

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

.stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
}

.stat-value.revenue {
    color: #10b981;
}

/* Content Panel */
.content-card {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 14px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    outline: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    background: #f8fafc;
}

.search-input:focus {
    border-color: var(--accent-dark);
    background: white;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.filter-summary {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

/* Table Design */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 16px 20px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    font-weight: 500;
}

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

tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
}

.status-badge.pending { background: #fef3c7; color: #d97706; }
.status-badge.approved { background: #d1fae5; color: #065f46; }
.status-badge.shipped { background: #dbeafe; color: #1e40af; }
.status-badge.unreachable { background: #ffedd5; color: #c2410c; }
.status-badge.canceled { background: #fee2e2; color: #991b1b; }

/* Buttons styling */
.btn {
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(251, 191, 36, 0.2);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--primary);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #cbd5e1;
}

.btn-outline:hover {
    border-color: white;
    color: white;
    background: rgba(255,255,255,0.05);
}

.btn-outline.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(251, 191, 36, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-excel {
    background: #107c41;
    color: white;
}

.btn-excel:hover {
    background: #0f6c38;
    box-shadow: 0 8px 15px rgba(16, 124, 65, 0.2);
}

/* Action Buttons inside Table */
.action-grid {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.btn-action {
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.btn-action.approve { background: #10b981; }
.btn-action.approve:hover { background: #059669; }

.btn-action.ship { background: #3b82f6; }
.btn-action.ship:hover { background: #2563eb; }

.btn-action.unreachable { background: #f97316; }
.btn-action.unreachable:hover { background: #ea580c; }

.btn-action.delete { background: #ef4444; }
.btn-action.delete:hover { background: #dc2626; }

.btn-action.view { background: #f1f5f9; color: var(--primary); border: 1px solid var(--border); }
.btn-action.view:hover { background: #e2e8f0; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 28px;
    padding: 40px;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.modal-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
}

/* Forms Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    background: #f8fafc;
    transition: all 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent-dark);
    background: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Details Modal Grid */
.modal-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.detail-value.address {
    line-height: 1.6;
    white-space: pre-line;
}

.detail-value.price {
    font-size: 1.4rem;
    font-weight: 900;
    color: #10b981;
}

.no-data {
    text-align: center;
    padding: 50px !important;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1rem;
}

/* Responsive Table / Layout */
@media(max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media(max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
}

/* Login Screen Overlay */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    color: white;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: white;
    margin-bottom: 8px;
}

.login-header h2 span {
    color: var(--accent);
}

.login-header p {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
}

.login-card label {
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.login-card input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 14px 18px;
    border-radius: 12px;
    width: 100%;
    outline: none;
    transition: all 0.3s;
}

.login-card input::placeholder {
    color: #64748b;
}

.login-card input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 380px;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 45px -10px rgba(15, 23, 42, 0.18);
}

.toast.hiding {
    animation: toastFadeOut 0.3s ease-out forwards;
}

.toast-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon-wrapper.success { background: rgba(16, 185, 129, 0.12); }
.toast-icon-wrapper.error { background: rgba(239, 68, 68, 0.12); }
.toast-icon-wrapper.warning { background: rgba(245, 158, 11, 0.12); }
.toast-icon-wrapper.info { background: rgba(59, 130, 246, 0.12); }

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 2px;
}

.toast-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.45;
    white-space: pre-line;
}

.toast-close {
    background: rgba(15, 23, 42, 0.05);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(15, 23, 42, 0.1);
    color: var(--primary);
    transform: rotate(90deg);
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 100%;
    transform-origin: left;
}

/* Toast Types styling */
.toast.success { border-left: 5px solid #10b981; }
.toast.success .toast-progress { background: linear-gradient(90deg, #10b981, #34d399); }
.toast.error { border-left: 5px solid #ef4444; }
.toast.error .toast-progress { background: linear-gradient(90deg, #ef4444, #f87171); }
.toast.warning { border-left: 5px solid #fbbf24; }
.toast.warning .toast-progress { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.toast.info { border-left: 5px solid #3b82f6; }
.toast.info .toast-progress { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

@keyframes toastSlideIn {
    from { transform: translateX(120%) translateY(-10px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.9); opacity: 0; }
}
