body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background: #35424a;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

h1 {
    margin: 0;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* footer removed */

.button {
    display: inline-block;
    font-size: 16px;
    color: #ffffff;
    background: #e8491d;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.button:hover {
    background: #c0392b;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
}

.card-header {
    font-size: 24px;
    margin-bottom: 10px;
}

.card-content {
    font-size: 16px;
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    margin: 0 10px;
    text-decoration: none;
    color: #e8491d;
}

.social-links a:hover {
    color: #c0392b;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --background: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --error: #ef4444;
    --success: #10b981;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.login-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

input::placeholder {
    color: var(--text-secondary);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

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

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.5);
}

p {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.brand-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.brand-logo img {
    max-height: 50px;
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
    }
}

/* Dashboard Styles */
.dashboard-container {
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

/* .dashboard-content layout handled by dashboard.php inline styles */

.card-form {
    flex: 1;
    min-width: 300px;
}


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

.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: 0.375rem;
}

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

h3 {
    margin: 1.5rem 0 1rem;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 1rem 0;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
}

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

.btn-secondary {
    background-color: #f3f4f6;
    color: var(--text-primary);
    text-decoration: none;
}

.preview-container {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 1rem;
}

.card-url {
    background-color: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.375rem;
    word-break: break-all;
    margin: 1rem 0;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Header with logout button */
.dashboard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-logout {
    background-color: #f3f4f6;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: #e5e7eb;
    color: var(--primary-color);
}

/* General visibility helpers */
img, video, iframe {
    max-width: 100%;
}

/* Dashboard-specific styles */
:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --secondary-color: #3f37c9;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.125rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
  }
  
  body {
    background-color: var(--gray-100);
    color: var(--gray-800);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
  }
  
  /* Main header styling */
  .main-header {
    background: linear-gradient(to right, #ffffff 0%, #ffffff 61.8%, rgb(0, 0, 55) 100%);
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1001;
    padding: 0.75rem 0;
    width: 100%;
  }

  .dark-mode .main-header {
    background: linear-gradient(to right, #0f172a 0%, #0f172a 61.8%, rgb(0, 0, 55) 100%);
  }

  .mixed-mode .main-header {
    background: linear-gradient(to right, #1e293b 0%, #1e293b 61.8%, rgb(0, 0, 55) 100%);
  }
  
  .main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 0 1rem;
    color: white;
  }
  
  .main-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: white;
  }
  
  .main-header nav ul {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
    color: white;
  }
  
  .main-header nav ul li {
    margin-left: 1.5rem;
    color: white;
  }
  
  .main-header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
  }
  
  .main-header nav ul li a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
  }
  
  /* Dashboard container */
  .dashboard-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1rem;
  }
  
  /* Dashboard header */
  .dashboard-header {
    margin-bottom: 2rem;
  }
  
  .dashboard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-header-top h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
  }
  
  .btn-logout {
    display: inline-flex;
    align-items: center;
    background-color: white;
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
  }
  
  .btn-logout:hover {
    background-color: var(--gray-50);
    color: var(--gray-900);
    border-color: var(--gray-400);
  }
  
  .btn-logout:before {
    content: "↩";
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Alert messages */
  .alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
  }
  
  .success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
  }
  
  .success:before {
    content: "✓";
    font-weight: bold;
    margin-right: 0.75rem;
  }
  
  /* .dashboard-content layout handled by dashboard.php inline styles */
  
  /* Card form styling */
  .card-form {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: box-shadow 0.3s ease;
  }
  
  .card-form:hover {
    box-shadow: var(--shadow-md);
  }
  
  .card-form h2 {
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
  }
  
  .card-form h3 {
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
    font-size: 1.25rem;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
  }
  
  .form-group textarea {
    min-height: 120px;
    resize: vertical;
  }
  
  .form-group input[type="color"] {
    height: 40px;
    padding: 0.25rem;
    cursor: pointer;
  }
  
  /* Button styling */
  .btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 1rem 0;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.2s ease;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
  }
  
  .btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
  
  .btn-secondary {
    background-color: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    text-decoration: none;
    margin-left: 0.5rem;
  }
  
  .btn-secondary:hover {
    background-color: var(--gray-50);
    color: var(--gray-900);
  }
  
  /* Card preview styling handled by dashboard.php */
  
  .preview-container {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
  }
  
  .preview-container:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  }
  
  .preview-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
  }
  
  .preview-container p {
    margin: 0.25rem 0;
  }
  
  .preview-container .job-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
  }
  
  .preview-container .company {
    font-style: italic;
    margin-bottom: 1rem;
  }
  
  .card-contact {
    margin: 1rem 0;
    padding: 0.5rem 0;
    border-top: 1px dashed var(--gray-300);
    border-bottom: 1px dashed var(--gray-300);
    width: 100%;
  }
  
  .card-social {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .card-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    background-color: var(--gray-100);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  
  .card-social a:hover {
    background-color: var(--gray-200);
    transform: translateY(-1px);
  }
  
  /* Card actions */
  .card-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-100);
  }
  
  .card-actions h3 {
    font-size: 1.1rem;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
  }
  
  .card-url {
    background-color: var(--gray-50);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    word-break: break-all;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    position: relative;
  }
  
  /* Fix for horizontal layout issue */
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
  }
  
  .main-header {
    display: block;
    width: 100%;
  }
  
  .dashboard-container {
    display: block;
    width: 100%;
  }
  
  /* Clear any floats */
  .main-header:after,
  .dashboard-container:after {
    content: "";
    display: table;
    clear: both;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .dashboard-header-top {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .dashboard-header-top h1 {
      margin-bottom: 1rem;
    }
    
    .card-form, .card-preview {
      padding: 1.25rem;
    }
  }
  
  /* Template selector styling */
  .template-selector {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 1rem;
      margin-top: 0.5rem;
  }
  
  .template-option {
      position: relative;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius);
      padding: 1rem;
      transition: all 0.2s ease;
  }
  
  .template-option:hover {
      border-color: var(--primary-light);
      background-color: var(--gray-50);
  }
  
  .template-option input[type="radio"] {
      position: absolute;
      opacity: 0;
  }
  
  .template-option label {
      display: block;
      cursor: pointer;
      width: 100%;
      margin: 0;
  }
  
  .template-option input[type="radio"]:checked + label .template-name {
      color: var(--primary-color);
  }
  
  .template-option input[type="radio"]:checked + label::before {
      content: "✓";
      position: absolute;
      top: 0.5rem;
      right: 0.5rem;
      color: var(--primary-color);
      font-weight: bold;
  }
  
  .template-option input[type="radio"]:checked + label {
      font-weight: 500;
  }
  
  .template-option input[type="radio"]:focus + label {
      outline: 2px solid rgba(67, 97, 238, 0.3);
      outline-offset: 2px;
  }
  
  .template-name {
      display: block;
      font-weight: 600;
      font-size: 1.1rem;
      margin-bottom: 0.25rem;
  }
  
  .template-desc {
      display: block;
      font-size: 0.85rem;
      color: var(--gray-500);
  }
  
  /* Form width improvements */
  .card-form {
      max-width: 800px;
      margin: 0 auto;
  }
  
  .form-group {
      margin-bottom: 1.5rem;
      /* Center the form group contents */
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  
  .form-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;
      font-size: 0.875rem;
      color: var(--gray-700);
      align-self: flex-start;
      width: 100%;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
      width: 100%; /* Full width of container */
      max-width: 600px; /* Approximately twice as long as before */
      padding: 0.75rem;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius);
      font-family: inherit;
      font-size: 0.95rem;
      transition: border-color 0.2s, box-shadow 0.2s;
  }
  
  /* Template selector vertical stacking */
  .template-selector {
      display: flex;
      flex-direction: column; /* Stack vertically */
      gap: 1rem;
      margin-top: 0.5rem;
      width: 100%;
      max-width: 600px; /* Match input field width */
  }
  
  .template-option {
      position: relative;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius);
      padding: 1rem;
      transition: all 0.2s ease;
      /* Make each option take full width */
      width: 100%;
  }
  
  .card-form button[type="submit"] {
      display: block;
      width: 100%;
      max-width: 600px;
      margin: 2rem auto 1rem;
  }
  
  /* Social media section - match width */
  .card-form h3 + .form-group {
      width: 100%;
  }
  .form-group {
      margin-bottom: 1.5rem;
      display: flex;
      flex-direction: column;
      align-items: flex-start; /* Change to flex-start for better alignment */
  }
  
  /* dashboard-content and card-preview layout handled by dashboard.php inline styles */
  @media (max-width: 1024px) {
      header, .main-header {
        border-bottom: 0;
        margin-bottom: 0px;
        padding-bottom: 0px;
        margin-left: 0;
        display: none;
    }
  }
  
  /* Image upload styling */
  .file-upload-container {
      margin-top: 0.5rem;
  }
  
  .current-image {
      margin: 1rem 0;
      padding: 1rem;
      background: var(--dark);
      border-radius: var(--radius);
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
      max-width: 300px;
  }
  
  .current-image img {
      max-width: 100%;
      height: auto;
      border-radius: var(--radius-sm);
  }
  
  .current-image.background img {
      max-height: 150px;
      width: 100%;
      object-fit: cover;
  }
  
  .current-image label {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      cursor: pointer;
      margin-top: 0.5rem;
      color: var(--danger);
      font-size: 0.875rem;
  }
  
  /* Upload status and loading indicator styles */
  .upload-loading {
      display: flex;
      align-items: center;
      margin: 8px 0;
      font-size: 0.9rem;
  }
  
  .spinner {
      width: 20px;
      height: 20px;
      border: 3px solid rgba(0, 0, 0, 0.1);
      border-radius: 50%;
      border-top-color: var(--primary-color);
      animation: spin 1s ease-in-out infinite;
      margin-right: 10px;
  }
  
  @keyframes spin {
      to { transform: rotate(360deg); }
  }
  
  .upload-message {
      color: var(--gray-700);
  }
  
  .upload-status {
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      margin: 8px 0;
      font-size: 0.9rem;
  }
  
  .upload-status.success {
      background-color: rgba(16, 185, 129, 0.1);
      color: var(--success-color);
  }
  
  .upload-status.error {
      background-color: rgba(239, 68, 68, 0.1);
      color: var(--danger-color);
  }
  
  .file-upload-container {
      position: relative;
  }
  
  .file-upload-container.uploading input[type="file"] {
      pointer-events: none;
      opacity: 0.7;
  }
  
  /* Dashboard Header */
  .dashboard-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.5rem;
  }
  
  .header-welcome h1 {
      font-size: 1.75rem;
      font-weight: 700;
      margin: 0 0 0.25rem;
      color: #2c3e50;
  }
  
  .text-muted {
      color: #7f8c8d;
  }
  
  .dashboard-actions {
      display: flex;
      gap: 0.75rem;
  }
  
  /* Stats Cards */
  .stats-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1.25rem;
      margin-bottom: 2rem;
  }
  
  .stat-card {
      background: white;
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      padding: 1.25rem;
      display: flex;
      align-items: center;
      transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .stat-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  }
  
  .stat-icon {
      background: rgba(52, 152, 219, 0.1);
      color: #3498db;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      font-size: 1.5rem;
      margin-right: 1rem;
  }
  
  .stat-details {
      display: flex;
      flex-direction: column;
  }
  
  .stat-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: #2c3e50;
  }
  
  .stat-label {
      font-size: 0.875rem;
      color: #7f8c8d;
  }
  
  /* Card Editor */
  .card-editor {
      background: white;
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      margin-bottom: 2rem;
      overflow: hidden;
  }
  
  .card-editor-header {
      background: #f8f9fa;
      border-bottom: 1px solid #e9ecef;
      padding: 0 1.5rem;
  }
  
  .editor-tabs {
      display: flex;
      list-style: none;
      padding: 0;
      margin: 0;
  }
  
  .editor-tabs li {
      margin-right: 2px;
  }
  
  .editor-tabs li a {
      display: block;
      padding: 1rem 1.5rem;
      color: #7f8c8d;
      text-decoration: none;
      border-bottom: 3px solid transparent;
      font-weight: 500;
      transition: all 0.2s;
  }
  
  .editor-tabs li a:hover {
      color: #3498db;
  }
  
  .editor-tabs li.active a {
      color: #3498db;
      border-bottom-color: #3498db;
  }
  
  .card-editor-content {
      padding: 1.5rem;
  }
  
  .tab-content {
      display: none;
  }
  
  .tab-content.active {
      display: block;
  }
  
  /* Form Styling */
  .form-group {
      margin-bottom: 1.5rem;
  }
  
  .form-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;
      color: #34495e;
  }
  
  .form-control {
      width: 100%;
      padding: 0.75rem 1rem;
      border: 1px solid #e9ecef;
      border-radius: 5px;
      font-size: 0.95rem;
      transition: all 0.2s;
  }
  
  .form-control:focus {
      border-color: #3498db;
      box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
      outline: none;
  }
  
  /* Button Styling */
  .btn {
      display: inline-flex;
      align-items: center;
      padding: 0.75rem 1.25rem;
      border-radius: 5px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      font-size: 0.95rem;
  }
  
  .btn i {
      margin-right: 8px;
  }
  
  .btn-primary {
      background: #3498db;
      color: white;
  }
  
  .btn-primary:hover {
      background: #2980b9;
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
  }
  
  .btn-outline {
      background: transparent;
      color: #3498db;
      border: 1px solid #3498db;
  }
  
  .btn-outline:hover {
      background: rgba(52, 152, 219, 0.1);
      transform: translateY(-2px);
  }
  
  /* Tab Styling */
  .editor-tabs {
      display: flex;
      list-style: none;
      padding: 0;
      margin: 0;
      border-bottom: 1px solid #e9ecef;
  }
  
  .editor-tabs li {
      margin-right: 2px;
  }
  
  .editor-tabs li a {
      display: block;
      padding: 1rem 1.5rem;
      color: #7f8c8d;
      text-decoration: none;
      border-bottom: 3px solid transparent;
      font-weight: 500;
      transition: all 0.2s;
  }
  
  .editor-tabs li a:hover {
      color: #3498db;
  }
  
  .editor-tabs li.active a {
      color: #3498db;
      border-bottom-color: #3498db;
  }
  
  .tab-content {
      display: none;
      padding: 1.5rem 0;
  }
  
  .tab-content.active {
      display: block;
  }
  
  .form-actions {
      margin: 2rem 0 1rem;
      display: flex;
      align-items: center;
      gap: 1rem;
  }
  
  .btn-success {
      background-color: #10b981 !important;
      border-color: #10b981 !important;
  }

  #card-qr-code {
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.qr-code-widget .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Add to your existing styles */
.btn-success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
}

.copy-btn, .copy-url-btn {
    transition: all 0.3s ease;
}

.url-display {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.url-display input {
    flex: 1;
    padding: 0.5rem;
    border-radius: 4px 0 0 4px;
    border: 1px solid #ccc;
}

.url-display .copy-btn {
    border-radius: 0 4px 4px 0;
    margin-left: -1px;
}

.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


.dashboard-layout.sidebar-visible .sidebar-overlay {
  display: block;
}


/* Fix for modal on mobile */
@media (max-width: 768px) {
  .modal-content {
    width: 94% !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }
  
  .share-options {
    grid-template-columns: 1fr !important;
  }
}

/* Fix body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Fix for iOS input zooming */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="url"],
  textarea {
    font-size: 16px !important;
  }
}


/* Theme Variables */
:root {
    --background-color: #f7fafc;
    --card-bg-color: #ffffff;
    --text-color: #333333;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --sidebar-bg: #ffffff;
    --sidebar-text: #4b5563;
    --sidebar-active: #3498db;
}

/* Dark Mode */
.dark-mode {
    --background-color: #0f172a;
    --card-bg-color: #1e293b;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #38bdf8;
}

/* Mixed Mode */
.mixed-mode {
    --background-color: #f7fafc;
    --card-bg-color: #ffffff;
    --text-color: #1a202c;
    --text-muted: #4a5568;
    --border-color: #cbd5e0;
    /* Dark sidebar with light content */
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-active: #38bdf8;
}

/* =============================================
   Dashboard Layout Framework
   ============================================= */
.dashboard-layout {
    display: flex;
    min-height: 0;
    width: 100%;
    position: relative;
    background-color: var(--background-color);
    color: var(--text-color);
}

.dashboard-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: fixed;
    top: var(--header-h, 0px);
    height: calc(100vh - var(--header-h, 0px));
    left: 0;
    overflow-y: auto;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav li a i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 0.5rem 1.5rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    line-height: 1;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 99;
}

/* --- Mobile: sidebar off-screen, hamburger visible --- */
@media (max-width: 992px) {
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 10px;
        left: 15px;
        z-index: 1000;
        background: #3498db;
        color: white;
        width: 45px;
        height: 45px;
        border-radius: 5px;
        border: none;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .dashboard-sidebar {
        transform: translateX(-100%);
        z-index: 999;
        top: 0;
        height: 100vh;
    }

    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 70px;
    }

    .dashboard-layout.sidebar-visible .dashboard-sidebar {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    }

    /* Hide hamburger when sidebar is open, show close button */
    .dashboard-layout.sidebar-visible .mobile-nav-toggle {
        display: none !important;
    }

    .sidebar-close {
        display: block;
    }

    .dashboard-layout.sidebar-visible .sidebar-overlay {
        display: block;
    }

    body.no-scroll {
        overflow: hidden;
    }
}

/* --- Desktop: hide hamburger & overlay --- */
@media (min-width: 993px) {
    .mobile-nav-toggle,
    .sidebar-overlay {
        display: none !important;
    }
}

.dashboard-sidebar .sidebar-header h2 {
    color: var(--sidebar-text);
}

.dashboard-sidebar .sidebar-nav ul li.active a {
    color: var(--sidebar-active) !important;
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--sidebar-active);
    padding-left: calc(1.5rem - 3px);
}

.dark-mode .dashboard-sidebar .sidebar-nav ul li.active a,
.mixed-mode .dashboard-sidebar .sidebar-nav ul li.active a {
    background-color: rgba(56, 189, 248, 0.1);
}

.dashboard-sidebar .sidebar-footer {
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Common containers */
.dashboard-content .card,
.settings-container,
.analytics-card,
.profile-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
}

/* Text elements */
h1, h2, h3, h4, h5, h6,
.dashboard-header,
.text-content,
label,
p {
    color: var(--text-color);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Form controls */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Theme-specific hover effects */
.light-mode .dashboard-sidebar .sidebar-nav ul li a:hover {
    background-color: #f1f5f9;
    color: #2563eb !important;
    border-left: 3px solid #3498db;
    padding-left: calc(1.5rem - 3px);
}

.dark-mode .dashboard-sidebar .sidebar-nav ul li a:hover {
    background-color: #1e293b;
    color: #38bdf8 !important;
    border-left: 3px solid #38bdf8;
    padding-left: calc(1.5rem - 3px);
}

.mixed-mode .dashboard-sidebar .sidebar-nav ul li a:hover {
    background-color: #2d3748;
    color: #38bdf8 !important;
    border-left: 3px solid #38bdf8;
    padding-left: calc(1.5rem - 3px);
}

/* Sidebar text colors via CSS variables */
.dashboard-sidebar .sidebar-nav ul li a {
    color: var(--sidebar-text);
}

.dashboard-sidebar .sidebar-header h2 {
    color: var(--sidebar-text);
}

.dashboard-sidebar .sidebar-divider {
    background: var(--border-color);
}

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

.dashboard-main {
    flex: 1;
    margin-left: 250px;
    padding: 1.5rem;
    min-width: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Smaller mobile: tighter horizontal padding */
@media (max-width: 768px) {
    .dashboard-main {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* No footer padding needed */
