:root {
  /* Primary Colors - Shopify Teal */
  --primary: #008060;      /* Shopify's primary teal */
  --primary-dark: #004c3f;  /* Darker teal for hover states */
  --primary-light: #f3fcf4; /* Very light teal for backgrounds */
  
  /* Secondary Colors - Dark Teal */
  --secondary: #004c3f;    /* Dark teal for secondary elements */
  --secondary-dark: #002e26; /* Even darker teal for hover states */
  --secondary-light: #e0f0e0; /* Light teal for backgrounds */
  
  /* Accent Colors - Shopify Green */
  --accent: #00a47c;       /* Brighter teal for accents */
  --accent-dark: #008060;   /* Primary teal for accent hover */
  
  /* Neutral Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --background: #f9fafb;
  --card-bg: #ffffff;
  --hover-bg: #f3f4f6;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 1.5em 0 0.75em;
    color: var(--text-primary);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--secondary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5em;
    margin-top: 1.5em;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

h4, h5, h6 {
    color: var(--text-secondary);
}

p {
    margin: 0 0 1.25em;
    font-size: 1rem;
    line-height: 1.7;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--blue-hover);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.button-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.button-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.button-secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.button-outline:hover {
    background-color: var(--primary-light);
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
    flex-wrap: wrap;
}

.download-buttons a {
    min-width: 200px;
    text-align: center;
}

/* Primary Button - Download Shops with Reasons */
#download_uninstall_reason_data_all,
#download_uninstall_reason_data_before_trial,
#download_uninstall_reason_data_during_trial,
#download_uninstall_reason_data_after_trial {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-decoration: none;
    transition: var(--transition);
}

#download_uninstall_reason_data_all:hover,
#download_uninstall_reason_data_before_trial:hover,
#download_uninstall_reason_data_during_trial:hover,
#download_uninstall_reason_data_after_trial:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Secondary Button - Download All Shops */
#download_all_uninstall_reason_data_all,
#download_all_uninstall_reason_data_before_trial,
#download_all_uninstall_reason_data_during_trial,
#download_all_uninstall_reason_data_after_trial {
    background-color: var(--secondary);
    color: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-decoration: none;
    transition: var(--transition);
}

#download_all_uninstall_reason_data_all:hover,
#download_all_uninstall_reason_data_before_trial:hover,
#download_all_uninstall_reason_data_during_trial:hover,
#download_all_uninstall_reason_data_after_trial:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .download-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .download-buttons a {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Container for content */
.container {
    max-width: 1440px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    background-color: var(--background);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Dashboard Cards */
.dashboard-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.75rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.dashboard-card h3 {
    color: var(--primary);
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.dashboard-card p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.card-icon {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    font-size: 2rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-card {
        padding: 1.5rem;
    }
}

/* Heading styles are defined in the typography section above */

/* Link styles are defined in the base styles above */

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

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

/* Zebra-striping for rows */
tr:nth-child(even) {
    background-color: var(--background);
}

/* Hover effect */
tr:hover {
    background-color: var(--hover-bg);
}

/* Responsive tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    th, td {
        padding: 0.75rem 1rem;
    }
}

/* Global Form Element Styling - Consistent across all pages */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="url"],
input[type="search"],
select,
textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--background);
    color: var(--text-primary);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Focus states for all form elements */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Special styling for select dropdowns */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Form labels */
label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

label:first-child {
    margin-top: 0;
}

/* Form containers */
form {
    max-width: 600px;
}

#input-form {
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

#input-form h1 {
    margin-top: 0;
    color: var(--primary);
}

/* Ensure consistent spacing */
br {
    line-height: 2;
}

/* Button styling for forms and general use */
button,
input[type="submit"],
input[type="button"] {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(0);
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Login Form Styles */
.login-form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input[type="password"],
.form-group input[type="text"] {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--background);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: var(--error);
    font-size: 0.875rem;
}

.error-message p {
    margin: 0;
    font-weight: 500;
}

/* Navbar Styles */
.navbar {
    background-color: var(--card-bg);
    padding: 0;
    border-radius: 0;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.nav-item, .dropbtn {
    color: var(--text-primary);
    text-align: center;
    padding: 1rem 1.25rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid transparent;
    margin: 0 0.25rem;
}

.nav-item:hover, .dropbtn:hover {
    background-color: var(--hover-bg);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.nav-item.logout {
    margin-left: auto;
    color: var(--error);
}

.nav-item.logout:hover {
    background-color: var(--error);
    color: white;
    border-bottom-color: transparent;
}

/* Dropdown Button */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: block; /* Changed from none to block for better control */
    position: absolute;
    background-color: var(--card-bg);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    z-index: 1100;
    border-radius: var(--radius);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
    margin-top: 8px;
    border: 1px solid var(--border);
    /* Add a small delay before hiding */
    transition-delay: 0.1s;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: var(--transition);
    font-size: 0.9rem;
    background: var(--card-bg);
    border-left: 3px solid transparent;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: var(--hover-bg);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 1.5rem;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown-content:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

/* Add a small gap between button and dropdown */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

/* Rotate arrow when dropdown is active */
.dropdown:hover .dropdown-arrow,
.dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
}

/* Improve keyboard navigation */
.dropdown:focus-within .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

/* Navbar styles for both mobile and desktop */
.navbar-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    flex-shrink: 0;
}

.nav-brand {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    padding: 1rem 0;
}

.navbar-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 0;
        position: relative;
    }
    
    .navbar-logo {
        width: 100%;
    }
    
    .navbar-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .navbar-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: var(--card-bg);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .navbar-links.active {
        display: flex;
        max-height: 1000px;
    }
    
    .nav-item, .dropbtn {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }
    
    .dropdown:hover .dropdown-content,
    .dropdown:focus-within .dropdown-content {
        display: block;
        max-height: 500px;
        transform: none;
    }
    
    .dropdown-content a {
        padding-left: 2.5rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-item.logout {
        margin-left: 0;
        margin-top: 0;
        border-top: none;
    }
    
    /* Hamburger animation */
    .navbar-toggle.active .hamburger-icon:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .navbar-toggle.active .hamburger-icon:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggle.active .hamburger-icon:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

.chart-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.chart-wrapper {
  flex: 1 1 450px;
  min-width: 400px;
  max-width: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 400px;
}

.chart-title {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 15px;
}

/* Remove old custom login styles */
.search {
    display: none;
}

.searchTerm {
    display: none;
}

.searchButton {
    display: none;
}

.wrap {
    display: none;
}

#loginSubmit {
    display: none;
}

#adnabuLink {
    display: none;
}

#errorMessage {
    display: none;
}

/* Data Table Styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    font-size: 0.875rem;
}

.data-table thead {
    background-color: var(--primary);
    color: white;
}

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

.data-table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background-color: var(--hover-bg);
}

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

.data-table .total-row {
    background-color: var(--primary-light);
    font-weight: 600;
}

.data-table .total-row:hover {
    background-color: var(--primary-light);
}

/* Content Section Styling */
.content-section {
    margin: 3rem 0;
}

/* Info Section Styling */
.info-section {
    background-color: var(--primary-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.info-section p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.features-list {
    margin-top: 0.75rem;
}

.features-list ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.features-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.content-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Responsive table styling */
@media (max-width: 768px) {
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}
