/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #121426 0%, #1a1d35 100%);
    min-height: 100vh;
    padding: 20px;
    font-size: 14px;
    color: #FFFFFF;
}

body.page-centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Header for standalone pages */
.header {
    background: #FFFFFF;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: #121426;
    font-size: 20px;
}

/* Typography */
h1 {
    color: #121426;
    margin-bottom: 10px;
    font-size: 28px;
}

h2 {
    color: #121426;
    margin-bottom: 20px;
    font-size: 22px;
}

.section-title {
    font-size: 20px;
    color: #121426;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #C9B37E;
    font-weight: 700;
}

/* Messages */
.message {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: none;
    font-size: 14px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message.show {
    display: block;
}

/* Empty States */
.empty-state {
    text-align: center;
    color: #888;
    padding: 50px;
    font-size: 15px;
}

/* Tables */
.product-table-container,
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 20px;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    min-width: 600px;
}

table thead {
    background: #121426;
    color: #FFFFFF;
}

table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 16px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
    color: #121426;
}

table tbody tr {
    transition: all 0.2s;
}

table tbody tr:hover {
    background-color: rgba(201, 179, 126, 0.08);
}

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

.table-actions {
    display: flex;
    gap: 8px;
}

/* Manage Customers Button & Nav Buttons */
.manage-customers-btn {
    display: inline-block;
    padding: 14px 24px;
    background: #C9B37E;
    color: #121426;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s;
    margin-bottom: 25px;
    font-size: 15px;
}

.manage-customers-btn:hover {
    background: #d4c390;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 179, 126, 0.3);
}

.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: 2px solid #C9B37E;
    background: #FFFFFF;
    color: #121426;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn:hover {
    background: #C9B37E;
    color: #121426;
    transform: translateY(-2px);
}

.btn-danger {
    border-color: #121426;
    color: #121426;
    background: #FFFFFF;
}

.btn-danger:hover {
    background: #121426;
    color: #FFFFFF;
}

.btn-primary {
    background: #C9B37E;
    color: #121426;
    border-color: #C9B37E;
}

.btn-primary:hover {
    background: #d4c390;
    border-color: #d4c390;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

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

.stat-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #C9B37E;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #121426;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* Help Text */
.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    table th, table td {
        padding: 12px 8px;
        font-size: 12px;
    }

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

    .table-actions {
        flex-direction: column;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .section-title {
        font-size: 18px;
    }
}
