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

:root {
    --primary: #2d7a3e;
    --primary-dark: #1f5c2e;
    --secondary: #f4f4f4;
    --accent: #ff6b35;
    --text: #333;
    --border: #ddd;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
}

/* Navigation */
.navbar {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Pages */
.page {
    display: none;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
}

/* Services Grid */
.services {
    margin-bottom: 3rem;
}

.services h2, .packages h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.3s;
}

.service-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.service-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    margin: 1rem 0;
}

/* Package Cards */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.package-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.package-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.package-card:hover {
    transform: translateY(-4px);
}

.package-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.package-card .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
}

.package-card .duration {
    color: #666;
    margin-bottom: 1rem;
}

.package-card ul {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.package-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.package-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

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

.btn:hover {
    background: #e0e0e0;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Forms */
.quote-form-section {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 2rem;
    border-radius: 4px;
    text-align: center;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

table tr:hover {
    background: var(--secondary);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-scheduled {
    background: #cce5ff;
    color: #004085;
}

.status-new {
    background: #fff3cd;
    color: #856404;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.invoice-modal-content {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: var(--text);
}

/* Invoice View */
.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.invoice-items {
    margin: 2rem 0;
}

.invoice-items table {
    margin-bottom: 1rem;
}

.invoice-total {
    text-align: right;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

.payment-options {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.payment-btn {
    flex: 1;
    min-width: 150px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links a {
        margin: 0 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 0.75rem 1rem;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .payment-options {
        flex-direction: column;
    }

    .payment-btn {
        width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    table th, table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 1rem;
    }

    .package-card.featured {
        transform: scale(1);
    }
}

/* Login Page */
.login-section {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Small button for logout */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-small:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== ORACLE'S INVOICE FORM REDESIGN ===== */

/* Invoice Form - Table Layout */
.invoice-items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.invoice-items-table thead {
  background: #f0f7f2;
}

.invoice-items-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #2d2d2d;
  border-bottom: 2px solid #e0e0e0;
  font-size: 14px;
}

.invoice-items-table th.col-qty,
.invoice-items-table th.col-price,
.invoice-items-table th.col-total {
  text-align: right;
}

.invoice-items-table tbody tr {
  background: white;
}

.invoice-items-table tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.invoice-items-table tbody tr:hover {
  background: #f5f5f5;
}

.invoice-items-table td {
  padding: 8px;
  border-bottom: 1px solid #e0e0e0;
}

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

.invoice-items-table input {
  width: 100%;
  padding: 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
}

.invoice-items-table input:focus {
  background: white;
  border: 2px solid var(--primary);
  outline: none;
  border-radius: 4px;
}

.invoice-items-table input[type="number"] {
  text-align: right;
}

.invoice-items-table .line-total {
  text-align: right;
  color: #666;
  font-weight: 500;
  padding-right: 16px;
  font-size: 14px;
  white-space: nowrap;
}

.invoice-items-table .col-description {
  width: 50%;
}

.invoice-items-table .col-qty {
  width: 80px;
}

.invoice-items-table .col-price {
  width: 100px;
}

.invoice-items-table .col-total {
  width: 100px;
}

.invoice-items-table .col-actions {
  width: 50px;
  text-align: center;
}

/* Remove button */
.btn-remove {
  background: white;
  border: 1px solid #e0e0e0;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  color: #999;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-remove:disabled {
  opacity: 0;
  pointer-events: none;
}

/* Service Preset Buttons */
.service-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 24px;
}

.service-presets-label {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.service-preset-btn {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  text-align: center;
}

.service-preset-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.service-preset-btn .service-name {
  font-size: 14px;
  font-weight: 600;
  color: #2d2d2d;
  margin-bottom: 4px;
}

.service-preset-btn .service-price {
  font-size: 12px;
  color: #666;
}

.service-preset-custom {
  border-style: dashed;
}

.service-preset-custom .service-name {
  color: var(--primary);
}

/* Add Line Item Button */
.btn-add-item {
  background: white;
  border: 2px dashed #e0e0e0;
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  margin: 16px 0;
}

.btn-add-item:hover {
  border-color: var(--primary);
  background: #f0f7f2;
}

/* Invoice Subtotal */
.invoice-subtotal {
  text-align: right;
  margin: 24px 0 16px;
  padding: 16px 0;
  border-top: 2px solid #e0e0e0;
}

.invoice-subtotal .label {
  color: #666;
  font-size: 18px;
  font-weight: normal;
  margin-right: 16px;
}

.invoice-subtotal .amount {
  color: var(--primary);
  font-size: 28px;
  font-weight: bold;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e0e0e0;
}

.btn-cancel {
  background: white;
  border: 1px solid #e0e0e0;
  color: #666;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-cancel:hover {
  background: #f5f5f5;
}

.btn-create-invoice {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-create-invoice:hover {
  background: var(--primary-dark);
}

.btn-create-invoice:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Section dividers */
.form-divider {
  border: 0;
  border-top: 1px solid #e0e0e0;
  margin: 24px 0;
}

/* Invoice Form Modal - Wider */
#modal .modal-content.invoice-modal {
  max-width: 850px;
}

/* Form section headers */
.form-section-header {
  font-size: 16px;
  font-weight: 600;
  color: #2d2d2d;
  margin-bottom: 16px;
}

/* Tablet Responsive */
@media (max-width: 768px) {
  #modal .modal-content.invoice-modal {
    max-width: 95vw;
    padding: 16px;
  }

  .service-presets {
    flex-direction: column;
  }

  .service-preset-btn {
    width: 100%;
  }

  .invoice-subtotal .label {
    font-size: 16px;
  }

  .invoice-subtotal .amount {
    font-size: 24px;
  }

  .invoice-items-table {
    font-size: 13px;
  }

  .invoice-items-table th,
  .invoice-items-table td {
    padding: 6px;
  }
}
