* { box-sizing: border-box; }
:root { --primary-color: #005a8d; --secondary-color: #00446b; --accent-color: #e31e24; --text-color: #333; --bg-color: #f4f7f6; --white: #ffffff; --border-radius: 8px; --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }

body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; margin: 0px; padding: 0px; background-color: var(--bg-color); color: var(--text-color); line-height: 1.6; }

header { background-color: var(--white); box-shadow: var(--shadow); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0px; z-index: 1000; }

.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); text-decoration: none; display: flex; align-items: center; gap: 10px; }

.logo img { height: 40px; }

header nav ul { list-style: none; display: flex; gap: 20px; margin: 0px; padding: 0px; }

header nav a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s; }

header nav a:hover, header nav a.active { color: var(--primary-color); }

.user-email {
    color: #777;
    font-size: 0.9rem;
    padding: 15px 10px;
    display: flex;
    align-items: center;
}

.btn, .btn-outline { display: inline-block; padding: 0.6rem 1.2rem; text-decoration: none; border-radius: var(--border-radius); transition: all 0.3s; cursor: pointer; font-size: 1rem; border: 2px solid transparent; text-align: center; box-sizing: border-box; }

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

.btn:hover { background-color: var(--secondary-color); border-color: var(--secondary-color); }

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

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

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

.hero { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: var(--white); padding: 4rem 2rem; text-align: center; }

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

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

.container { max-width: 1200px; margin: 2rem auto; padding: 0px 1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: -3rem; }

.card { background: var(--white); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); transition: transform 0.3s; display: flex; flex-direction: column; align-items: flex-start; }

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

.card h3 { color: var(--primary-color); margin-top: 0px; }

.card-icon { font-size: 2rem; margin-bottom: 1rem; color: var(--accent-color); }

.card-actions { margin-top: auto; padding-top: 1.5rem; width: 100%; display: flex; gap: 10px; }

.login-container { width: 100%; max-width: 400px; margin: 4rem auto; padding: 2rem; background: var(--white); border-radius: var(--border-radius); box-shadow: var(--shadow); }

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

.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-color); }

.form-group input { width: 100%; padding: 0.8rem; border: 1px solid rgb(221, 221, 221); border-radius: 4px; box-sizing: border-box; }

.form-group input:focus { border-color: var(--primary-color); outline: none; }

footer { background-color: rgb(51, 51, 51); color: var(--white); padding: 2rem; text-align: center; margin-top: 4rem; }

footer a { color: rgb(170, 170, 170); text-decoration: none; }

footer a:hover { color: var(--white); }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 768px) {
  header { 
      flex-wrap: wrap;
      padding: 1rem;
  }
  
  .mobile-menu-toggle {
      display: block;
  }

  header nav {
      width: 100%;
      display: none;
      margin-top: 1rem;
      border-top: 1px solid #eee;
  }

  header nav.active {
      display: block;
      animation: slideDown 0.3s ease-out;
  }

  header nav ul {
      flex-direction: column;
      gap: 0;
  }

  header nav li {
      width: 100%;
  }

  header nav a, .user-email {
      display: block;
      padding: 15px 10px;
      border-bottom: 1px solid #f5f5f5;
      width: 100%;
  }

  .user-email {
      background-color: #f9f9f9;
      font-size: 0.85rem;
  }

  /* Reset button styles in nav for mobile to look like links */
  header nav a.btn {
      display: block;
      width: 100%;
      background: none;
      color: var(--primary-color);
      border: none;
      text-align: left;
      border-radius: 0;
      padding: 15px 10px;
      font-weight: 500;
  }

  header nav a.btn:hover {
      background-color: #f0f7fb;
      color: var(--secondary-color);
  }

  .cards { margin-top: 2rem; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-section { margin-top: 3rem; }

.faq-item { border-bottom: 1px solid rgb(221, 221, 221); padding: 1rem 0px; }

.faq-question { font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }

.faq-answer { display: none; padding-top: 0.5rem; color: rgb(102, 102, 102); }

.faq-answer.open { display: block; }

.calculator-container { background: white; padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-top: 1rem; }

.multiselect-container { border: 1px solid rgb(221, 221, 221); padding: 5px; border-radius: 4px; min-height: 45px; display: flex; flex-wrap: wrap; align-items: center; position: relative; background: white; }

.tag { background-color: var(--secondary-color); color: white; padding: 5px 10px; border-radius: 15px; margin: 2px; font-size: 0.9rem; display: flex; align-items: center; }
.tag-exclude { background-color: #e31e24; }
.tag-remove { margin-left: 8px; cursor: pointer; font-weight: bold; }

.search-input { border: none; outline: none; padding: 5px; flex-grow: 1; min-width: 150px; font-size: 1rem; }

.dropdown-list { position: absolute; top: 100%; left: 0px; right: 0px; background: white; border-right: 1px solid rgb(221, 221, 221); border-bottom: 1px solid rgb(221, 221, 221); border-left: 1px solid rgb(221, 221, 221); border-image: initial; border-top: none; max-height: 200px; overflow-y: auto; z-index: 100; display: none; box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px; }

.dropdown-item { padding: 10px; cursor: pointer; border-bottom: 1px solid rgb(240, 240, 240); }

.dropdown-item:hover { background-color: rgb(249, 249, 249); }

/* Form Layout Helpers */
.form-row { display: flex; gap: 20px; margin-bottom: 1.5rem; }
.form-group.half { flex: 1; margin-bottom: 0; }
.form-control { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-size: 1rem; }
.checkbox-label { user-select: none; }
.file-info { display: block; margin-top: 5px; font-size: 0.8rem; color: #666; }
.form-section { border-top: 1px solid #eee; margin-top: 2rem; padding-top: 1.5rem; }

.quote-result { margin-top: 2rem; padding: 1.5rem; background-color: rgb(244, 247, 246); border-radius: var(--border-radius); text-align: center; }

.price-large { font-size: 3rem; color: var(--primary-color); font-weight: bold; margin: 10px 0px; }

.breakdown { color: rgb(102, 102, 102); font-size: 0.9rem; line-height: 1.5; }

.content-section { margin-bottom: 4rem; }

.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

.specs-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.95rem; }

.specs-table th, .specs-table td { border: 1px solid rgb(221, 221, 221); padding: 0.8rem; text-align: left; }

.specs-table th { background-color: rgb(244, 247, 246); font-weight: 600; }

.tech-specs { margin-top: 2rem; }

.responsive-img { max-width: 100%; height: auto; border-radius: var(--border-radius); box-shadow: var(--shadow); border: 1px solid rgb(238, 238, 238); }

.caption { font-size: 0.9rem; color: rgb(102, 102, 102); font-style: italic; margin-top: 0.5rem; text-align: center; }

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 140px); /* Adjust based on header/footer */
}

.dashboard-sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 20px 0;
}

.dashboard-content {
    flex: 1;
    padding: 30px;
    background: #f4f7f6;
}

#dashboard-tabs {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar-nav li {
    width: 100%;
    display: block;
}

.sidebar-nav a {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #f0f7fb;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-section {
    display: block;
}

.nav-section-header {
    padding: 15px 25px 5px 25px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.nav-section-header:focus {
    outline: 2px solid rgba(0, 90, 141, 0.35);
    outline-offset: 2px;
}

.nav-section-toggle {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #999;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.nav-section.collapsed .nav-section-toggle {
    transform: rotate(-90deg);
}

.nav-section-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section.collapsed .nav-section-items {
    display: none;
}

/* Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    padding: 40px;
}
.spinner {
    border: 4px solid #f3f3f3; 
    border-top: 4px solid var(--primary-color); 
    border-radius: 50%; 
    width: 40px; 
    height: 40px; 
    animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Blocking Overlay */
.blocking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.blocking-overlay .spinner {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

.blocking-overlay p {
    margin-top: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Tab Components */

/* Dashboard Stats Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-card p {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.positive-value { color: #2ecc71; }
.negative-value { color: #e74c3c; }

/* Tools */
.tools-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    align-items: center;
    max-width: 800px;
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tools-grid label {
    font-weight: bold;
    text-align: right;
    color: #555;
}

.tools-grid select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.code-container {
    background: #2d2d2d;
    color: #ccc;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    font-family: monospace;
    overflow-x: auto;
    border: 1px solid #444;
}

.banner-preview {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border: 1px dashed #ddd;
    margin-top: 20px;
}

/* Account */
.account-section {
    background: #fff;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.account-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    align-items: center;
    max-width: 800px;
}

.account-grid label {
    text-align: right;
    font-weight: bold;
    color: #555;
}

.account-grid input, .account-grid select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

.commission-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    margin-top: 10px;
}

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

.commission-table th {
    background: #f9f9f9;
    font-weight: bold;
    color: #555;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    .tools-grid, .account-grid {
        grid-template-columns: 1fr;
    }
    .tools-grid label, .account-grid label {
        text-align: left;
    }
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.data-table th {
    background-color: #f8f9fa;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
}

.data-table th:hover {
    background-color: #eee;
}

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

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

.sort-icon {
    display: inline-block;
    width: 15px;
    text-align: center;
    color: var(--primary-color);
}

/* Pagination */
.pagination-container {
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.rows-per-page select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 5px;
}

.pagination-controls {
    display: flex;
    align-items: center;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.gallery-section {
    margin: 3rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16/10;
    background-color: #eee;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform 0.7s cubic-bezier(0.2, 1, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 50%;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--white);
    opacity: 0.9;
}

.gallery-caption {
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.gallery-subcaption {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
    transition: transform 0.2s;
    opacity: 0.8;
}

.lightbox-close:hover {
    transform: scale(1.1);
    opacity: 1;
}

.lightbox-caption {
    color: #e0e0e0;
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 300;
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 16px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.toast.success {
    background-color: #2ecc71;
}

.toast.error {
    background-color: #e74c3c;
}

