* {
    box-sizing: border-box;
}

.strikethrough {
    text-decoration: line-through;
    color: #888 !important;
    opacity: 0.6;
}

:root {
    --light-gray: #f4f5f9;
    --medium-gray: #eef0f2;
    --dark-gray: #1a1d21;
    --blue: #3855BE;
    --dark-blue: #2F48A0;
    --green: #34a853;
    --dark-green: #218838;
    --danger-color: #ea4335;
    --hot-pink: #ff0066;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --sidebar-width: 260px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --alert-blue: #e3f2fd;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Button Standardization */
.btn, 
.btn-primary, 
.btn-secondary, 
.btn-danger, 
.btn-outline-primary,
.login-button,
.auth-button,
.signup-button {
    background-color: var(--blue) !important;
    color: white !important;
    padding: 12px 24px;
    border-radius: 50px !important;
    border: 0 !important;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

.btn-danger {
    background-color: var(--danger-color) !important;
}

.btn-secondary {
    background-color: #6c757d !important;
}

.btn:hover,
.btn-primary:hover,
.login-button:hover,
.auth-button:hover,
.signup-button:hover {
    background-color: var(--dark-blue) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 85, 190, 0.35);
}

.btn-danger:hover {
    background-color: #d32f2f !important;
    transform: translateY(-3px);
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(0);
}

/* Table Refinements */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

th, td {
    padding: 18px 24px; /* More spacing */
    text-align: left;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--medium-gray);
}

th.sortable:hover {
    background-color: var(--blue) !important;
    color: white !important;
}

th.sortable:hover .sort-icon {
    color: white !important;
    opacity: 1;
}

.clickable-row:hover {
    background-color: rgba(56, 85, 190, 0.04) !important; /* Unified hover blue */
}

/* Stats Cards (No lift) */
.stat-card {
    background-color: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: none !important; /* Force no lift */
}

/* Sidebar Logout Fix */
.nav-logout-btn {
    color: var(--blue) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    margin-top: 5px;
    display: inline-block;
    transition: var(--transition) !important;
}

.nav-logout-btn:hover {
    text-decoration: underline !important;
    transform: translateY(-1px) scale(1.03) !important;
}

/* Special Section Backgrounds */
.bg-alert-blue {
    background-color: var(--alert-blue) !important;
    border: 1px solid #bbdefb !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fcfdfe;
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    letter-spacing: -0.03em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

.content-body {
    margin-left: var(--sidebar-width);
    padding: 30px 40px;
    min-height: 100vh;
}

/* Card Styling */
.card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Unified Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--medium-gray);
    min-height: 90px;
    height: auto;
    padding-top: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.045em;
    background: linear-gradient(135deg, #475569 30%, var(--blue) 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    display: inline-block;
    padding-bottom: 0.15rem;
}

.page-header h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--hot-pink));
    margin: 0.6rem 0 0 0;
    border-radius: 2px;
}

.table-link {
    color: var(--blue);
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    cursor: pointer;
}

.table-link:hover {
    transform: translateY(-2px) scale(1.03);
    color: var(--dark-blue);
}

/*************
  Common
**************/
button {
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:focus {
    outline: none;
}

h1 {
    color: #333;
}

i {
    margin-right: 10px;
    font-size: 18px;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

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

a:hover {
    transform: translateY(-1px) scale(1.02);
}


/*********
   Search Bar
**********/
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    font-size: 15px;
    color: #000 !important;
    font-weight: 600;
    background-color: white;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
    color: #999 !important;
    font-weight: 400;
}

.search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(56, 85, 190, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: #666;
    pointer-events: none;
    transition: color 0.2s ease;
    margin-right: 0; /* Override default i margin */
}

.search-input:focus + .search-icon {
    color: var(--blue);
}


/*********
   Table
**********/
table {
    width: 100%;
    border-collapse: collapse;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: var(--light-gray);
}

/*********
   Action Buttons
**********/
.action-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Action Buttons */
.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--blue); /* Default icons to blue */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.icon-btn:hover {
    background-color: rgba(56, 85, 190, 0.1);
    transform: scale(1.1);
}

.icon-btn.btn-danger {
    color: var(--danger-color) !important;
    background: none !important;
    box-shadow: none !important;
}

.icon-btn.btn-danger:hover {
    background-color: rgba(234, 67, 53, 0.1) !important;
}

/* Custom Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-gray);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 9999;
    box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 140%;
}

/* Ensure right-most tooltips don't clip */
td:last-child [data-tooltip]::after {
    left: auto;
    right: 0;
    transform: none;
}

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

.icon-btn.btn-primary:hover {
    background-color: var(--dark-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 85, 190, 0.35);
}

.alert-info-status {
    background-color: #e3f2fd;
    border-left: 4px solid var(--blue);
    color: #0d47a1;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.icon-btn i {
    margin-right: 0;
    font-size: 16px;
}


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

.icon-btn.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-secondary {
    background-color: white;
    color: var(--blue);
    border: 1px solid var(--blue);
}

.btn-secondary:hover {
    background-color: var(--light-gray);
    color: var(--dark-blue);
    border-color: var(--dark-blue);
}

.card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

.table-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: gray;
    margin-right: 5px;
}

.table-actions button:hover {
    background-color: var(--medium-gray);
}

tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
    height: 60px;
    vertical-align: middle;
    box-sizing: border-box;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

th.sortable:hover {
    background-color: var(--blue) !important;
    color: white !important;
}

th.sortable:hover .sort-icon {
    color: white !important;
    opacity: 1;
}

.sort-icon {
    margin-left: 5px;
    font-size: 10px;
    opacity: 0.5;
}

th.asc .sort-icon, th.desc .sort-icon {
    opacity: 1;
}

/*********
   Table
**********/
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background-color: #f8f9fa;
    color: #666;
    font-size: 13px; /* Increased from 11px for better readability */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 16px 20px;
    border-bottom: 2px solid var(--medium-gray);
    text-align: left;
}

td {
    padding: 16px 20px;
    font-size: 15px; /* Increased from 14px for better readability */
    color: #444;
    border-bottom: 1px solid var(--medium-gray);
    vertical-align: middle;
}

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

tr {
    background-color: white;
    transition: background-color 0.2s;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #fcfdfe;
}

.campaign-page-table {
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Removed redundant td styling */


/*********
   Modal
**********/

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: auto;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: none;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background-color: #fff;
    border-bottom: 1px solid var(--medium-gray);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-body {
    padding: 30px;
    flex-grow: 1;
}

.form-actions {
    margin-top: 0;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
}

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

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay[style*="display: flex"],
.modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.modal-content .form-group {
    margin-bottom: 24px;
}

.modal-content .form-actions {
    margin-top: 32px;
    padding: 24px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Mandatory field indicator */
.mandatory::after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
}

/* Validation styling */
.form-control.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

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

.modal-content .form-group {
    margin-bottom: 1.25rem;
}

.modal-content .form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-footer button {
    margin-left: 10px;
}

.file-upload {
    border: 2px dashed var(--medium-gray);
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    position: relative;
    margin-bottom: 16px;
    cursor: pointer;
    transition: medium-gray 0.3s ease;
}

.file-upload:hover {
    color: var(--dark-gray);
}

.file-upload p {
    margin: 0;
    font-size: 14px;
    color: var(--dark-blue);
}

.file-upload small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--dark-gray);
}

.file-upload input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}


/****************
      Navbar
*****************/

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: white;
    border-right: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.navbar-header {
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--medium-gray);
    height: 90px;
    margin-bottom: 20px;
}

.navbar-header a {
    text-decoration: none !important;
    display: flex;
    align-items: center;
}

.pricient-logo {
    height: 48px;
}

.pricient-logo-text {
    background: linear-gradient(to right, var(--blue), var(--hot-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    display: inline-block;
}

.navbar-nav-container {
    padding: 0 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    padding: 24px 16px 8px 16px;
    font-weight: 700;
}

.nav-item {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    transition: var(--transition);
    text-decoration: none !important;
}

.nav-item i {
    width: 20px;
    font-size: 16px;
    margin-right: 12px;
    color: var(--blue);
    transition: color 0.2s;
}

.nav-item:hover {
    background-color: #f0f2f5;
    color: var(--blue);
    transform: translateY(-2px) scale(1.02);
}

.nav-item.active {
    background-color: rgba(56, 85, 190, 0.08);
    color: var(--blue);
}

.navbar-footer {
    padding: 15px;
    border-top: 1px solid var(--medium-gray);
}

.user-profile-small {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}


/********************
  New Login Template
*********************/

.auth-header {
    box-shadow: var(--shadow);
    display: flex;
    padding: 1rem 0;
}

.auth-header-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-container {
    font-family: 'Arial', sans-serif;
    background: white;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 50px auto;
    padding: 40px 20px;
}

.auth-footer {
    background-color: var(--dark-blue);
    color: white;
    padding: 0.75rem 0;
    text-align: center;
    margin-top: auto;
    position: fixed;
    height: 45px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-footer p {
    margin: 0;
    font-size: 0.85rem;
}

.password-requirements {
  background-color: var(--light-gray);
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  border-radius: 0 6px 6px 0;
}

.password-requirements h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.password-requirements ul {
  margin: 0;
  padding-left: 1.2rem;
}

.password-requirements li {
  font-size: 0.8rem;
  color: var(--dark-gray);
  margin-bottom: 0.2rem;
}


form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.form-actions {
    margin-top: 1.5rem;
}

/* Messages */
.messages {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.message {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.message.success {
    background-color: rgba(67, 160, 71, 0.1);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.message.error {
    background-color: rgba(229, 57, 53, 0.1);
    border-left: 4px solid var(--error-color);
    color: var(--error-color);
}

.message.info {
    background-color: rgba(74, 111, 220, 0.1);
    border-left: 4px solid var(--blue);
    color: var(--blue);
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: rgba(229, 57, 53, 0.1);
    border-left: 4px solid var(--error-color);
    color: var(--error-color);
}

/* Login Styles */
.login-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-subtitle {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

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

.login-form-group {
    display: flex;
    flex-direction: column;
}

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

.login-button {
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
}

.login-button:hover {
    background-color: var(--dark-blue);
}

.login-options {
    text-align: center;
}

.login-options p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.forgot-password {
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--blue);
    text-decoration: underline;
}

/* Consolidated auth styling above */

.signup-button {
    width: fit-content;
}

.signup-options {
    margin-top: 1rem;
}

.signup-options a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.signup-options a:hover {
    text-decoration: underline;
}

input, select, textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: medium-gray 0.3s ease;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

input:focus {
    outline: none;
    color: var(--dark-gray);
}

label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .login-card {
        max-width: 90%;
    }
}

/*******************
  Stores Template
*******************/

.stores-content .page-header {
    margin-bottom: 30px;
}

.stores-content h1 {
    color: var(--dark-gray);
    margin: 0;
}

.stores-content .action-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 50px !important;
    margin: 5px;
}

.stores-content .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.stores-content .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.stores-content .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* View campaign popup */
.campaign-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.campaign-box {
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 15px;
    flex: 1 1 calc(50% - 10px);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;    
}

.campaign-box:hover {
    background: var(--light-gray);
}

/*********************
  Dashboard Template
**********************/

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 500;
}


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

.stat-card {
    background-color: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.stat-card h3 {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.stat-card .value {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-card .trend {
    font-size: 13px;
    color: var(--green);
    display: flex;
    align-items: center;
    margin-top: 12px;
    font-weight: 600;
}

.trend.negative {
    color: var(--danger-color);
}

/* Campaigns Table */
.campaign-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.campaign-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: rgba(52, 168, 83, 0.1);
    color: var(--green);
}

.status-inactive {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--danger-color);
}

.status-pending {
    background-color: rgba(251, 188, 5, 0.1);
    color: #fbbc05;
}

/* Tab navigation for campaign details */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--medium-gray);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
}

.tab.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

.tab-content {
    display: none;
}

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

/* Products table in campaign detail */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--dark-gray);
    transition: all 0.2s ease;
    background-color: #fff;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233855be' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.1em;
    padding-right: 3.5rem !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(56, 85, 190, 0.1);
}

.form-control::placeholder {
    color: #bbb;
}

textarea.form-control {
    min-height: 100px;
}

/* Slider and Number Input Styles */
.admin-slider {
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: #eef2ff;
    outline: none;
    flex: 1;
}

.admin-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
}

.admin-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.admin-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.admin-number-input {
    width: 90px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 10px;
    border: 2px solid #eef2ff;
    border-radius: 10px;
    color: var(--blue) !important;
    background: #fcfdff;
    transition: all 0.2s ease;
}

.admin-number-input:focus {
    border-color: var(--blue);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(56, 85, 190, 0.08);
    color: var(--blue) !important;
}

.campaign-file-upload {
    border: 2px dashed var(--blue);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: rgba(56, 85, 190, 0.02);
    cursor: pointer;
    transition: all 0.2s ease;
}

.campaign-file-upload:hover {
    background: rgba(56, 85, 190, 0.05);
    border-color: var(--dark-blue);
}

.productLabels-modal {
    width: auto;
}

.productLabel-card {
    border-radius: 16px;
    border: 1px solid var(--medium-gray);
    padding: 24px;
    margin: 15px auto;
    transition: var(--transition);
    display: flex;
    max-width: 400px;
    width: 100%;
    background: white;
    box-shadow: var(--shadow-sm);
}

.productLabel-column {
    width: 50%;
}

.productLabel-column-align-right {
    text-align: right;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue);
}

.productLabel-column-align-right s {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 500;
}

.productLabel-product-name {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-gray);
    letter-spacing: -0.02em;
}

.productLabel-qr-code {
    width: 100px;
    height: 100px;
    margin-left: 30px;
}

.productLabel-barcode {
    height: 50px;
    width: 100px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px !important;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none !important;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 85, 190, 0.35);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary, .btn-secondary, .btn-danger, .btn-outline-primary {
    background-color: var(--blue);
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px !important;
    border: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(56, 85, 190, 0.15);
}

.btn-primary:hover, .btn-outline-primary:hover {
    background-color: var(--dark-blue);
}

.btn-danger {
    background-color: var(--danger-color);
    box-shadow: 0 4px 10px rgba(234, 67, 53, 0.15);
}

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

.btn-secondary {
    background-color: #6c757d;
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.15);
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 85, 190, 0.35);
}

.btn:active {
    transform: translateY(0);
}

.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: #f0f2f5;
    color: var(--blue);
}


/********************
  Campaign Template
*********************/

.campaign-body {
    padding: 20px;
}

.campaign-main-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #333;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
    color: #999;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Campaign Info Styles */
.campaign-info {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.campaign-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.campaign-header h1 {
    margin: 0;
    margin-right: 15px;
    font-size: 24px;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.campaign-details {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 0;
    margin-bottom: 0;
    font-size: 16px;
}

.detail-item .label, .campaign-description .label {
    font-weight: 600;
    color: #555;
    margin-right: 0;
    font-size: 16px;
}

.detail-item .value, .campaign-description .value {
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.campaign-description {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    line-height: 1.6;
    font-size: 16px;
    margin-top: 15px;
}

/* Metrics Container */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.metric-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #666;
}

.metric-card .value {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.trend {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.trend i {
    margin-right: 5px;
}

.trend.positive {
    color: #28a745;
}

.trend.negative {
    color: #dc3545;
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 300px;
    position: relative;
}

.chart-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ddd;
}

.chart-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--medium-gray);
    min-height: 70px;
}

.card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-grow: 1;
    justify-content: space-between;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
    white-space: nowrap;
}

/* MAB Status */
.mab-status {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.mab-progress {
    height: 100%;
    background: linear-gradient(90deg, #4e73df, #224abe);
    border-radius: 4px;
}

/* Product Details */
.product-details {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.product-info h2 {
    margin-top: 0;
    margin-bottom: 5px;
}

.product-id {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.detail-label {
    color: #666;
}

/* MAB Large Status */
.mab-status-large {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
}

.mab-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.mab-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Price Distribution */
.price-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    margin-bottom: 10px;
}

.price-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 5px;
}

.price-bar-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.price-bar-fill {
    width: 100%;
    background-color: #4e73df;
    border-radius: 4px 4px 0 0;
}

.price-bar-value {
    margin-top: 5px;
}



/**********************
  Simulation Template
***********************/
.simulation-container {
    margin-top: 20px;
    padding: 20px;
}

.simulation-container .form-group h3 {
    padding: 20px 0px 20px 0px;
}

.log {
    margin-top: 20px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
}
.log-entry {
    margin-bottom: 10px;
    padding: 5px;
    border-bottom: 1px solid #eee;
}
.log-entry.success {
    color: #28a745;
}
.log-entry.error {
    color: #dc3545;
}
.button-container {
    margin-top: 20px;
    display: flex;
}
.button-container button {
    margin-right: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 50px !important;
    cursor: pointer;
    font-size: 14px;
}
.button-container button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#stopSimulationBtn {
    background-color: #dc3545;
    color: white;
    display: none;
    border-radius: 10px;
}
#stopSimulationBtn:hover {
    background-color: #b72c3a;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 85, 190, 0.35);
}


/********************
  Products Template
*********************/

.loading {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-top: 20px;
}


/****************
 Admin Template
*****************/
/* Styles now handled by global card and page-header classes */

/* Toggle Switch Styling */
.campaign-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    vertical-align: middle;
    transition: var(--transition);
    cursor: pointer;
}

.campaign-switch:hover {
    transform: translateY(-2px) scale(1.1);
}

.campaign-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.campaign-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e4e6eb;
    transition: .3s;
    border-radius: 20px;
}

.campaign-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .campaign-slider {
    background-color: var(--green);
}

input:checked + .campaign-slider:before {
    transform: translateX(18px);
}

/* Clickable Table Rows */
.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.clickable-row:hover {
  background-color: rgba(0, 123, 255, 0.05) !important;
}

/* Ensure interactive elements within rows still work */
.clickable-row label,
.clickable-row input,
.clickable-row button {
  position: relative;
  z-index: 2;
}

/****************
  Messages/Alerts
*****************/
.messages-container {
    margin-left: var(--sidebar-width);
    padding: 20px 40px 0 40px;
}

.alert {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.alert-success, .message.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error, .alert-danger, .message.error, .message.danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning, .message.warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info, .message.info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}


/*****************
  Auth UI Update (Login, Signup, Reset)
******************/
.auth-container, .signup-container {
    font-family: 'Arial', sans-serif;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 95%;
    max-width: 500px;
    margin: 60px auto 120px auto;
    padding: 40px 30px;
    text-align: left;
}

.auth-container .login-title, .signup-container .login-title {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-container h2, .signup-container h2 {
    font-size: 24px;
    color: var(--dark-gray);
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-form, .signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-row, .signup-form .form-row {
    display: flex;
    gap: 15px;
}

.auth-form .form-group, .signup-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form .form-control, .signup-form .form-control, 
.auth-form input, .signup-form input {
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-control:focus, .signup-form .form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(56, 85, 190, 0.1);
    outline: none;
}

.auth-form .form-actions, .signup-form .form-actions {
    background-color: transparent;
    border-top: none;
    padding: 0;
    margin-top: 10px;
}

.auth-button, .signup-button, .login-button {
    width: 100%;
    padding: 14px;
    box-sizing: border-box;
    background-color: var(--blue);
    color: #fff;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-button:hover, .signup-button:hover, .login-button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: none !important;
}

.auth-options, .signup-options, .login-options {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid var(--light-gray);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-options a, .signup-options a, .login-options a {
    color: var(--blue);
    font-weight: 500;
}

@media (max-width: 600px) {
    .auth-container, .signup-container {
        margin: 20px auto 80px auto;
        padding: 30px 20px;
    }
    
    .auth-form .form-row, .signup-form .form-row {
        flex-direction: column;
        gap: 20px;
    }
}


/****************
  Labels/Highlights
*****************/
.status-label-highlight {
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--light-gray);
    border-left: 4px solid var(--blue);
    font-weight: bold;
    color: var(--dark-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
}
nup-button:hover {
    background-color: var(--dark-blue);
}

@media (max-width: 600px) {
    .signup-form .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

/****************
  Labels/Highlights
*****************/
.status-label-highlight {
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--light-gray);
    border-left: 4px solid var(--blue);
    font-weight: bold;
    color: var(--dark-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.strikethrough {
    text-decoration: line-through;
    color: #999;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Required fields styling */
.required-field::after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
}
