/* GRID IRON CRM - Theme (inspired by gridironclothing.com) */

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #121318;
    color: #e0e0e0;
}

a { color: #a78bfa; }
a:hover { color: #c4b5fd; }

/* === Header / Nav === */
.header {
    background: #1d1e20;
    color: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #673de6;
}

.header h1 {
    font-size: 22px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header h1 span {
    color: #673de6;
}

.header .logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav {
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav a {
    color: #b0b0b0;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav a:hover,
.nav a.active {
    color: #fff;
    background: rgba(103, 61, 230, 0.25);
}

.logout-btn {
    background: #673de6 !important;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #5025d1 !important;
}

/* === Container === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* === Cards === */
.card {
    background: #1d1e20;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #2a2b2f;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.card h2 {
    color: #fff;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* === Stat Cards === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #1d1e20;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #2a2b2f;
    transition: border-color 0.3s, transform 0.2s;
}

.stat-card:hover {
    border-color: #673de6;
    transform: translateY(-2px);
}

.stat-card h3 {
    color: #888;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
}

.stat-card.primary .value {
    color: #673de6;
}

/* === Tables === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    text-align: left;
    padding: 12px 15px;
    background: #16171a;
    border-bottom: 2px solid #673de6;
    font-weight: 600;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #2a2b2f;
    color: #ccc;
}

tr:hover td {
    background: rgba(103, 61, 230, 0.05);
}

td a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 500;
}

td a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

/* === Status Badges === */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.status-confirmed { background: rgba(103, 61, 230, 0.15); color: #a78bfa; }
.status-processing { background: rgba(0, 188, 212, 0.15); color: #26c6da; }
.status-shipped { background: rgba(33, 150, 243, 0.15); color: #42a5f5; }
.status-delivered { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.status-completed { background: rgba(76, 175, 80, 0.2); color: #66bb6a; }
.status-cancelled { background: rgba(244, 67, 54, 0.15); color: #ef5350; }
.status-refunded { background: rgba(158, 158, 158, 0.15); color: #bdbdbd; }
.status-returned { background: rgba(255, 152, 0, 0.15); color: #ff9800; }
.status-available { background: rgba(76, 175, 80, 0.15); color: #66bb6a; }
.status-unavailable { background: rgba(244, 67, 54, 0.15); color: #ef5350; }
.status-low { background: rgba(255, 152, 0, 0.15); color: #ff9800; }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: #673de6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    background: #5025d1;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #2a2b2f;
    color: #ccc;
}

.btn-secondary:hover {
    background: #3a3b3f;
    color: #fff;
}

.btn-danger {
    background: #d32f2f;
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* === Forms === */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    background: #16171a;
    border: 2px solid #2a2b2f;
    border-radius: 6px;
    font-size: 14px;
    color: #e0e0e0;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #673de6;
}

input:disabled {
    background: #0d0e10;
    color: #666;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    cursor: pointer;
}

select option {
    background: #1d1e20;
    color: #e0e0e0;
}

/* === Form Grid === */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* === Alerts === */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #66bb6a;
    border-left-color: #66bb6a;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    color: #ef5350;
    border-left-color: #ef5350;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border-left-color: #ff9800;
}

/* === Toolbar === */
.toolbar {
    background: #1d1e20;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #2a2b2f;
}

.toolbar h2 {
    color: #fff;
    margin-bottom: 5px;
}

.toolbar p {
    color: #888;
    font-size: 14px;
}

/* === Filter Bar === */
.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    width: auto;
    min-width: 160px;
}

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: #1d1e20;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2b2f;
    transition: transform 0.3s, border-color 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #673de6;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #16171a;
}

.product-info { padding: 15px; }
.product-sku { color: #673de6; font-size: 12px; font-weight: 700; margin-bottom: 5px; letter-spacing: 1px; text-transform: uppercase; }
.product-name { font-size: 16px; font-weight: 600; margin-bottom: 5px; color: #fff; }
.product-meta { font-size: 12px; color: #888; margin-bottom: 10px; }

.product-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: #16171a;
    border-radius: 6px;
}

.pricing-item { text-align: center; }
.pricing-label { font-size: 11px; color: #888; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.pricing-value { font-size: 16px; font-weight: bold; color: #fff; }
.pricing-value.cost { color: #ef5350; }
.pricing-value.retail { color: #66bb6a; }

.product-stock {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.stock-tag {
    padding: 2px 8px;
    background: #16171a;
    border-radius: 4px;
    font-size: 11px;
    color: #aaa;
    border: 1px solid #2a2b2f;
}

.stock-tag.zero {
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.3);
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.product-actions a {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: #673de6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.product-actions a:hover { background: #5025d1; color: #fff; }

/* === Detail Pages === */
.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #2a2b2f;
}

.detail-row .label {
    font-weight: 600;
    width: 200px;
    color: #888;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.detail-row .value { color: #e0e0e0; }

/* === Profit Box === */
.profit-box {
    background: rgba(103, 61, 230, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    border-left: 4px solid #673de6;
}

.profit-box .label { font-size: 14px; color: #a78bfa; margin-bottom: 5px; }
.profit-box .value { font-size: 32px; font-weight: bold; color: #fff; }
.profit-box .margin { font-size: 24px; color: #673de6; margin-top: 10px; }

/* === Stat Box (Inventory) === */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-box {
    background: #16171a;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #2a2b2f;
}

.stat-box h3 {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box .value {
    font-size: 36px;
    font-weight: bold;
    color: #673de6;
}

.stat-box .value.warning { color: #ff9800; }
.stat-box .value.danger { color: #ef5350; }

/* === Calculator Results === */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.result-section { display: none; }
.result-section.show { display: block; }

.result-box {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.result-box.wholesale { background: rgba(255, 193, 7, 0.08); border-left-color: #ffc107; }
.result-box.retail { background: rgba(76, 175, 80, 0.08); border-left-color: #66bb6a; }
.result-box.profit { background: rgba(103, 61, 230, 0.08); border-left-color: #673de6; }

.result-box h3 { margin-bottom: 15px; }
.result-box.wholesale h3 { color: #ffc107; }
.result-box.retail h3 { color: #66bb6a; }
.result-box.profit h3 { color: #a78bfa; }

.result-row { display: flex; justify-content: space-between; margin: 8px 0; }
.result-label { color: #888; font-size: 14px; }
.result-value { font-size: 18px; font-weight: bold; color: #fff; }
.result-total { font-size: 24px; color: #673de6; padding-top: 10px; border-top: 2px solid #2a2b2f; margin-top: 10px; }
.profit-margin { font-size: 32px; color: #673de6; text-align: center; padding: 20px; }

/* === Size Stock Grid === */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.size-input {
    text-align: center;
}

.size-input label {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.size-input input {
    text-align: center;
}

/* === Status Timeline === */
.timeline {
    padding: 15px 0;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-left: 2px solid #2a2b2f;
    margin-left: 8px;
    padding-left: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #673de6;
}

.timeline-date {
    color: #888;
    font-size: 12px;
    min-width: 140px;
}

.timeline-status {
    font-weight: 600;
    color: #fff;
}

.timeline-notes {
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

.timeline-by {
    color: #666;
    font-size: 11px;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #1d1e20;
    border-radius: 12px;
    border: 1px solid #2a2b2f;
}

.empty-state h3 { color: #888; margin-bottom: 10px; }
.empty-state p { color: #666; margin-bottom: 20px; }

/* === Checkbox === */
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.checkbox-group input[type="checkbox"] { width: auto; accent-color: #673de6; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #121318; }
::-webkit-scrollbar-thumb { background: #2a2b2f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3b3f; }

/* === User Info === */
.user-info {
    background: #16171a;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
    border: 1px solid #2a2b2f;
}

.user-info strong { color: #fff; }

/* === Items List (Order Detail) === */
.items-list {
    margin: 15px 0;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #16171a;
    border-radius: 6px;
    margin-bottom: 8px;
}

.item-name { font-weight: 600; color: #fff; }
.item-details { font-size: 13px; color: #888; margin-top: 3px; }
.item-price { font-weight: 700; color: #a78bfa; font-size: 16px; }
