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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #1a1a2e;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    margin-left: 1.5rem;
}

.nav-links a:hover {
    color: #fff;
}

/* Main content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

h1 {
    margin-bottom: 1.5rem;
    color: #1a1a2e;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card h2 {
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.product-card .description {
    color: #666;
    margin-bottom: 1rem;
}

.product-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d6a4f;
    margin-bottom: 1rem;
}

.product-card .features {
    list-style: none;
    margin-bottom: 1rem;
}

.product-card .features li {
    padding: 0.25rem 0;
    color: #666;
}

.product-card .features li:before {
    content: "✓ ";
    color: #2d6a4f;
}

.product-card form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.product-card input[type="number"] {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary {
    background: #2d6a4f;
    color: #fff;
}

.btn-primary:hover {
    background: #1b4332;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Login page */
.login-page {
    max-width: 400px;
    margin: 2rem auto;
}

.login-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

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

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1a1a2e;
}

/* Data tables */
.data-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Status badges */
.status-completed {
    color: #2d6a4f;
}

.status-pending {
    color: #b45309;
}

/* Search form */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-form input {
    flex: 1;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Success page */
.success-page {
    max-width: 600px;
    margin: 0 auto;
}

.success-page h1 {
    color: #2d6a4f;
}

.order-details,
.license-codes,
.activation-instructions {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.license-codes ul {
    list-style: none;
    margin-top: 1rem;
}

.license-codes li {
    padding: 0.5rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.license-codes code {
    font-size: 1.1rem;
    font-weight: 500;
}

.activation-instructions pre {
    background: #1a1a2e;
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Cancel page */
.cancel-page {
    text-align: center;
    padding: 3rem 0;
}

/* Reset section on homepage */
.reset-section {
    margin-top: 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.reset-section h2 {
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.reset-section p {
    color: #666;
    margin-bottom: 1rem;
}

/* Reset page */
.reset-page {
    max-width: 600px;
    margin: 0 auto;
}

.reset-form-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reset-form .form-group input {
    font-family: monospace;
    font-size: 1.1rem;
}

.license-details {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.license-details h2 {
    margin-bottom: 1rem;
    color: #2d6a4f;
}

.info-table {
    width: 100%;
    margin-bottom: 1.5rem;
}

.info-table th,
.info-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.info-table th {
    width: 40%;
    color: #666;
    font-weight: 500;
}

.info-table code {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.95rem;
}

.reset-action {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.reset-action p {
    margin-bottom: 0.5rem;
}

.reset-action .note {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.reset-action .btn {
    margin: 0.25rem;
}

.back-link {
    margin-top: 1.5rem;
}

.back-link a {
    color: #666;
    text-decoration: none;
}

.back-link a:hover {
    color: #1a1a2e;
}

/* Reset success page extras */
.reset-info {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reset-info ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.reset-info li {
    padding: 0.25rem 0;
    color: #666;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.page-info {
    color: #666;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Refund button */
.btn-danger {
    background: #dc2626;
    color: #fff;
}

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

.refunded-label {
    color: #dc2626;
    font-size: 0.875rem;
}

.status-refunded {
    color: #dc2626;
}

/* License codes cell */
.license-codes-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    font-size: 0.75rem;
}

.hwid-cell {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 1rem 0;
    text-align: center;
}
