/* Base Styles */
:root {
    --primary-color: #e67e22;
    --secondary-color: #2c3e50;
    --accent-color: #16a085;
    --background-color: #f7f7f7;
    --button-color: #e74c3c;
    --text-color: #333;
    --text-light: #fff;
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
  }
  
  /* Loading Animation */
  .loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--button-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--secondary-color);
    color: var(--text-light);
    transition: var(--transition);
    z-index: 100;
    overflow-y: auto;
  }
  
  .sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
  }
  
  .user-profile {
    display: flex;
    align-items: center;
    margin-top: 1rem;
  }
  
  .user-profile img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
  }
  
  .user-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }
  
  .user-info p {
    font-size: 0.8rem;
    color: #bbb;
  }
  
  .sidebar-nav {
    padding: 1.5rem 0;
  }
  
  .sidebar-nav ul {
    list-style: none;
  }
  
  .sidebar-nav li {
    margin-bottom: 0.5rem;
  }
  
  .sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
  }
  
  .sidebar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
  }
  
  .sidebar-nav li.active a {
    background-color: rgba(230, 126, 34, 0.1);
    color: var(--primary-color);
  }
  
  .sidebar-nav li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary-color);
  }
  
  .sidebar-nav i {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
  }
  
  .sidebar-nav span {
    flex: 1;
  }
  
  .badge {
    background-color: var(--button-color);
    color: white;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: bold;
  }
  
  .sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
  }
  
  .logout-btn {
    display: flex;
    align-items: center;
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
  }
  
  .logout-btn:hover {
    color: var(--button-color);
  }
  
  .logout-btn i {
    margin-right: 1rem;
  }
  
  /* Main Content */
  .main-content {
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
  }
  
  /* Top Navigation */
  .top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 90;
  }
  
  .menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    color: var(--secondary-color);
  }
  
  .search-bar {
    position: relative;
    flex: 1;
    max-width: 500px;
  }
  
  .search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
  }
  
  .search-bar input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
  }
  
  .search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
    outline: none;
  }
  
  .nav-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  
  .notification {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .notification:hover {
    color: var(--primary-color);
  }
  
  .notification .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--button-color);
  }
  
  /* Settings Container */
  .settings-container {
    padding: 2rem;
  }
  
  /* Settings Header */
  .settings-header {
    margin-bottom: 2rem;
  }
  
  .settings-header h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
  }
  
  .settings-header p {
    color: #666;
    font-size: 1.1rem;
  }
  
  /* Settings Tabs */
  .settings-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
  }
  
  .tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
  }
  
  .tab-btn::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
  }
  
  .tab-btn.active {
    color: var(--secondary-color);
  }
  
  .tab-btn.active::after {
    width: 100%;
  }
  
  .tab-btn:hover {
    color: var(--secondary-color);
  }
  
  /* Settings Tab Content */
  .settings-tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
  }
  
  .settings-tab-content.active {
    display: block;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  /* Settings Card */
  .settings-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
  }
  
  .settings-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }
  
  .settings-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
  }
  
  .settings-card-header h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
  }
  
  .settings-card-header p {
    color: #666;
    font-size: 0.9rem;
  }
  
  /* Settings Form */
  .settings-form {
    padding: 1.5rem;
  }
  
  .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .form-row .form-group {
    flex: 1;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
    outline: none;
  }
  
  .form-group textarea {
    min-height: 100px;
    resize: vertical;
  }
  
  /* Profile Picture Upload */
  .profile-pic-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  
  .profile-pic-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid #eee;
    transition: var(--transition);
  }
  
  .profile-pic-preview:hover {
    border-color: var(--primary-color);
  }
  
  .profile-pic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: var(--transition);
  }
  
  .profile-pic-preview:hover .upload-overlay {
    opacity: 1;
  }
  
  #profile-pic {
    display: none;
  }
  
  /* Password Strength */
  .input-group {
    position: relative;
  }
  
  .password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    cursor: pointer;
  }
  
  .password-strength {
    margin-top: 0.5rem;
  }
  
  .strength-bar {
    height: 5px;
    background-color: #eee;
    border-radius: 5px;
    margin-bottom: 0.3rem;
    width: 0;
    transition: var(--transition);
  }
  
  .strength-text {
    font-size: 0.8rem;
    color: #777;
  }
  
  /* Two-Factor Authentication */
  .two-factor-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
  }
  
  .two-factor-info {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .two-factor-info i {
    font-size: 2rem;
    color: var(--accent-color);
  }
  
  .two-factor-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }
  
  .two-factor-info p {
    color: #666;
    font-size: 0.9rem;
  }
  
  .two-factor-setup {
    padding: 1.5rem;
  }
  
  .two-factor-setup p {
    color: #666;
    margin-bottom: 1rem;
  }
  
  .setup-btn {
    padding: 0.6rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .setup-btn:hover {
    background-color: #d35400;
  }
  
  /* Toggle Switch */
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
  }
  
  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 24px;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
  }
  
  input:checked + .slider {
    background-color: var(--primary-color);
  }
  
  input:checked + .slider:before {
    transform: translateX(26px);
  }
  
  /* Notification Settings */
  .notification-group {
    margin-bottom: 2rem;
  }
  
  .notification-group h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
  }
  
  .notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
  }
  
  .notification-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }
  
  .notification-info p {
    color: #666;
    font-size: 0.9rem;
  }
  
  /* Theme Options */
  .theme-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  
  .theme-option {
    flex: 1;
  }
  
  .theme-option input {
    display: none;
  }
  
  .theme-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
  }
  
  .theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: var(--transition);
  }
  
  .theme-option input:checked + label .theme-preview {
    border-color: var(--primary-color);
  }
  
  .light-theme {
    background: linear-gradient(to right, #f7f7f7 50%, white 50%);
  }
  
  .dark-theme {
    background: linear-gradient(to right, #1a1a1a 50%, #2c3e50 50%);
  }
  
  .system-theme {
    background: linear-gradient(to right, #f7f7f7 50%, #1a1a1a 50%);
  }
  
  /* Language Select */
  .language-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    transition: var(--transition);
  }
  
  .language-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
    outline: none;
  }
  
  /* Dietary Preferences */
  .dietary-preferences {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    user-select: none;
  }
  
  .checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }
  
  .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: var(--transition);
  }
  
  .checkbox-label:hover input ~ .checkmark {
    background-color: #f1f1f1;
  }
  
  .checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .checkmark:after {
    content: "";
    position: absolute;
    display: none;
  }
  
  .checkbox-label input:checked ~ .checkmark:after {
    display: block;
  }
  
  .checkbox-label .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  
  /* Form Actions */
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .cancel-btn {
    padding: 0.8rem 1.5rem;
    background-color: #eee;
    color: #666;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .cancel-btn:hover {
    background-color: #ddd;
  }
  
  .save-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .save-btn:hover {
    background-color: #d35400;
  }
  
  /* Danger Zone */
  .danger-zone {
    border-top: 3px solid var(--button-color);
  }
  
  .danger-zone .settings-card-header {
    border-bottom: none;
  }
  
  .danger-actions {
    padding: 1.5rem;
  }
  
  .danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
  }
  
  .danger-action h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
  }
  
  .danger-action p {
    color: #666;
    font-size: 0.9rem;
  }
  
  .delete-btn {
    padding: 0.6rem 1.5rem;
    background-color: white;
    color: var(--button-color);
    border: 1px solid var(--button-color);
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .delete-btn:hover {
    background-color: var(--button-color);
    color: white;
  }
  
  /* Responsive Design */
  @media (max-width: 1200px) {
    .sidebar {
      width: var(--sidebar-collapsed);
    }
    
    .sidebar-header, .user-info, .sidebar-nav span, .logout-btn span {
      display: none;
    }
    
    .sidebar-nav a {
      justify-content: center;
      padding: 1rem 0;
    }
    
    .sidebar-nav i {
      margin-right: 0;
      font-size: 1.5rem;
    }
    
    .main-content {
      margin-left: var(--sidebar-collapsed);
    }
  }
  
  @media (max-width: 992px) {
    .settings-tabs {
      overflow-x: auto;
      padding-bottom: 10px;
    }
    
    .tab-btn {
      white-space: nowrap;
    }
    
    .form-row {
      flex-direction: column;
      gap: 1rem;
    }
  }
  
  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
      width: 280px;
      z-index: 1000;
    }
    
    .sidebar.active {
      transform: translateX(0);
    }
    
    .main-content {
      margin-left: 0;
    }
    
    .menu-toggle {
      display: block;
    }
    
    .settings-container {
      padding: 1.5rem;
    }
    
    .settings-header h1 {
      font-size: 2rem;
    }
    
    .form-actions {
      justify-content: center;
    }
    
    .cancel-btn, .save-btn {
      width: 100%;
      text-align: center;
    }
  }
  
  @media (max-width: 576px) {
    .top-nav {
      flex-direction: column;
      gap: 1rem;
      padding: 1rem;
    }
    
    .search-bar {
      width: 100%;
      margin-left: 0;
    }
    
    .nav-icons {
      width: 100%;
      justify-content: space-between;
    }
    
    .theme-options {
      flex-direction: column;
    }
    
    .danger-action {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
    
    .delete-btn {
      width: 100%;
    }
  }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 0px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #d35400;
  }