/*
 * General styles and CSS custom properties
 * Base typography, colors, and utility classes
 */

:root {
  --prof-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --prof-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  --prof-border-radius: 8px;
  --prof-border-radius-sm: 4px;
  --prof-border-radius-lg: 12px;
  --prof-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --prof-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --prof-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --prof-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --prof-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Professional Color Palette */
  --prof-primary: #2563eb;
  --prof-primary-hover: #1d4ed8;
  --prof-primary-light: #dbeafe;
  --prof-secondary: #64748b;
  --prof-secondary-hover: #475569;
  --prof-success: #16a34a;
  --prof-success-light: #dcfce7;
  --prof-warning: #ca8a04;
  --prof-warning-light: #fefce8;
  --prof-danger: #dc2626;
  --prof-danger-light: #fee2e2;
  --prof-info: #0891b2;
  --prof-info-light: #cffafe;
  
  /* Neutral Colors */
  --prof-white: #ffffff;
  --prof-gray-50: #f8fafc;
  --prof-gray-100: #f1f5f9;
  --prof-gray-200: #e2e8f0;
  --prof-gray-300: #cbd5e1;
  --prof-gray-400: #94a3b8;
  --prof-gray-500: #64748b;
  --prof-gray-600: #475569;
  --prof-gray-700: #334155;
  --prof-gray-800: #1e293b;
  --prof-gray-900: #0f172a;
  
  /* Semantic Colors */
  --prof-background: var(--prof-white);
  --prof-surface: var(--prof-gray-50);
  --prof-surface-elevated: var(--prof-white);
  --prof-border: var(--prof-gray-200);
  --prof-border-light: var(--prof-gray-100);
  --prof-text: var(--prof-gray-900);
  --prof-text-muted: var(--prof-gray-600);
  --prof-text-light: var(--prof-gray-500);
  
  /* Focus and interaction */
  --prof-focus-ring: rgba(37, 99, 235, 0.2);
  --prof-hover-bg: var(--prof-gray-50);
}

/* Base typography and layout */
body {
  font-family: var(--prof-font-primary);
  line-height: 1.6;
  color: var(--prof-text);
  background-color: var(--prof-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 40px;
}

/* Typography Scale */
.title, .subtitle {
  font-family: var(--prof-font-primary);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--prof-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--prof-font-primary);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--prof-text);
}

/* Button Styling */
.button {
  border-radius: var(--prof-border-radius);
  font-weight: 500;
  font-family: var(--prof-font-primary);
  box-shadow: var(--prof-shadow-sm);
  border: 1px solid var(--prof-border);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.button:hover {
  box-shadow: var(--prof-shadow);
  transform: translateY(-1px);
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--prof-focus-ring);
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--prof-shadow-sm);
}

.button.is-primary {
  background-color: var(--prof-primary);
  border-color: var(--prof-primary);
  color: white;
}

.button.is-primary:hover {
  background-color: var(--prof-primary-hover);
  border-color: var(--prof-primary-hover);
}

.button.is-info {
  background-color: var(--prof-info);
  border-color: var(--prof-info);
  color: white;
}

.button.is-success {
  background-color: var(--prof-success);
  border-color: var(--prof-success);
  color: white;
}

.button.is-warning {
  background-color: var(--prof-warning);
  border-color: var(--prof-warning);
  color: white;
}

.button.is-danger {
  background-color: var(--prof-danger);
  border-color: var(--prof-danger);
  color: white;
}

.button.is-outlined {
  background-color: transparent;
  border: 1px solid var(--prof-border);
  color: var(--prof-text);
}

.button.is-primary.is-outlined {
  color: var(--prof-primary);
  border-color: var(--prof-primary);
}

.button.is-info.is-outlined {
  color: var(--prof-info);
  border-color: var(--prof-info);
}

.button.is-outlined:hover {
  background-color: var(--prof-hover-bg);
}

.button.is-light {
  background-color: var(--prof-gray-100);
  border-color: var(--prof-gray-200);
  color: var(--prof-gray-700);
}

/* Card Styling */
.card {
  border-radius: var(--prof-border-radius);
  box-shadow: var(--prof-shadow);
  border: 1px solid var(--prof-border-light);
  background-color: var(--prof-surface-elevated);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

.card-header {
  background-color: var(--prof-surface);
  border-bottom: 1px solid var(--prof-border-light);
  padding: 0.25rem 1rem;
}

.card-header-title {
  font-family: var(--prof-font-primary);
  font-weight: 600;
  color: var(--prof-text);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.card-content {
  padding: 1rem 1.25rem;
}

/* Input Styling */
.input, .textarea, .select select {
  border-radius: var(--prof-border-radius);
  border: 1px solid var(--prof-border);
  background-color: var(--prof-white);
  color: var(--prof-text);
  font-family: var(--prof-font-primary);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.input:focus, .textarea:focus, .select select:focus {
  border-color: var(--prof-primary);
  box-shadow: 0 0 0 3px var(--prof-focus-ring);
  outline: none;
}

.input::placeholder, .textarea::placeholder {
  color: var(--prof-text-light);
}

/* Form Elements */
.field:not(:last-child) {
  margin-bottom: 1.5rem;
}

.label {
  font-weight: 500;
  color: var(--prof-text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.help {
  font-size: 0.75rem;
  color: var(--prof-text-muted);
  margin-top: 0.25rem;
}

/* Table Styling */
.table {
  border-radius: var(--prof-border-radius);
  box-shadow: var(--prof-shadow-sm);
  border: 1px solid var(--prof-border-light);
  background-color: var(--prof-white);
  overflow: hidden;
}

.table th {
  font-weight: 600;
  color: var(--prof-text);
  background-color: var(--prof-surface);
  border-bottom: 1px solid var(--prof-border-light);
  padding: 1rem 0.75rem;
}

.table td {
  border-bottom: 1px solid var(--prof-border-light);
  padding: 0.75rem;
  vertical-align: middle;
}

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

/* Tag Styling */
.tag {
  border-radius: var(--prof-border-radius-sm);
  font-weight: 500;
  font-size: 0.75rem;
  border: 1px solid var(--prof-border);
  background-color: var(--prof-surface);
  color: var(--prof-text);
}

.tag.is-primary {
  background-color: var(--prof-primary-light);
  color: var(--prof-primary);
  border-color: var(--prof-primary);
}

.tag.is-success {
  background-color: var(--prof-success-light);
  color: var(--prof-success);
  border-color: var(--prof-success);
}

.tag.is-warning {
  background-color: var(--prof-warning-light);
  color: var(--prof-warning);
  border-color: var(--prof-warning);
}

.tag.is-danger {
  background-color: var(--prof-danger-light);
  color: var(--prof-danger);
  border-color: var(--prof-danger);
}

.tag.is-small {
  font-size: 0.6rem;
  padding: 0.1rem 0.25rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Notification Styling */
.notification {
  border-radius: var(--prof-border-radius);
  border: 1px solid transparent;
  box-shadow: var(--prof-shadow-sm);
  position: relative;
}

.notification.is-primary {
  background-color: var(--prof-primary-light);
  color: var(--prof-primary);
  border-color: var(--prof-primary);
}

.notification.is-info {
  background-color: var(--prof-info-light);
  color: var(--prof-info);
  border-color: var(--prof-info);
}

.notification.is-success {
  background-color: var(--prof-success-light);
  color: var(--prof-success);
  border-color: var(--prof-success);
}

.notification.is-warning {
  background-color: var(--prof-warning-light);
  color: var(--prof-warning);
  border-color: var(--prof-warning);
}

.notification.is-danger {
  background-color: var(--prof-danger-light);
  color: var(--prof-danger);
  border-color: var(--prof-danger);
}

/* Progress Bar */
.progress {
  border-radius: var(--prof-border-radius);
  background-color: var(--prof-gray-200);
  height: 0.75rem;
  overflow: hidden;
}

.progress.is-primary::-webkit-progress-value {
  background-color: var(--prof-primary);
}

.progress.is-info::-webkit-progress-value {
  background-color: var(--prof-info);
}

.progress.is-success::-webkit-progress-value {
  background-color: var(--prof-success);
}

/* Modal Styling */
.modal-card {
  border-radius: var(--prof-border-radius-lg);
  box-shadow: var(--prof-shadow-xl);
  border: 1px solid var(--prof-border-light);
  background-color: var(--prof-white);
  overflow: hidden;
  max-width: 90vw;
}

.modal-card-head {
  background-color: var(--prof-surface);
  border-bottom: 1px solid var(--prof-border-light);
  padding: 1.5rem;
}

.modal-card-title {
  font-family: var(--prof-font-primary);
  font-weight: 600;
  color: var(--prof-text);
  font-size: 1.25rem;
}

.modal-card-body {
  padding: 1.5rem;
  background-color: var(--prof-white);
}

.modal-card-foot {
  background-color: var(--prof-surface);
  border-top: 1px solid var(--prof-border-light);
  padding: 1.5rem;
}

.modal .delete {
  background-color: var(--prof-gray-100);
  border: 1px solid var(--prof-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal .delete:hover {
  background-color: var(--prof-danger-light);
  border-color: var(--prof-danger);
}

.modal .delete::before,
.modal .delete::after {
  background-color: var(--prof-gray-500);
  height: 2px;
  width: 50%;
}

.modal .delete:hover::before,
.modal .delete:hover::after {
  background-color: var(--prof-danger);
}

/* Pagination */
.pagination-link, .pagination-previous, .pagination-next {
  border-radius: var(--prof-border-radius);
  border: 1px solid var(--prof-border);
  color: var(--prof-text);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-link:hover, .pagination-previous:hover, .pagination-next:hover {
  background-color: var(--prof-hover-bg);
  border-color: var(--prof-primary);
}

.pagination-link.is-current {
  background-color: var(--prof-primary);
  border-color: var(--prof-primary);
  color: white;
}

/* Menu */
.menu-list a {
  border-radius: var(--prof-border-radius);
  color: var(--prof-text);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
}

.menu-list a:hover {
  background-color: var(--prof-hover-bg);
  color: var(--prof-text);
}

.menu-list a.is-active {
  background-color: var(--prof-primary);
  color: white;
}

/* Links */
a:not(.button):not(.navbar-item):not(.dropdown-item):not(.sidebar-item):not(.folder-link):not(.file-list-item) {
  color: var(--prof-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid transparent;
}

a:not(.button):not(.navbar-item):not(.dropdown-item):not(.sidebar-item):not(.folder-link):not(.file-list-item):hover {
  color: var(--prof-primary-hover);
  border-bottom-color: var(--prof-primary-hover);
}

/* Fix button_to styling to match links */
form.button_to {
  display: inline-block;
  margin: 0;
}

.field.is-grouped form.button_to {
  margin-right: 0.5rem;
}

.control form.button_to {
  display: block;
}

/* Inline form styling for button_to elements */
form.is-inline {
  display: inline-block;
  margin: 0;
  padding: 0;
}

form.is-inline button {
  margin: 0 0.25rem;
}

.inline-form {
  display: inline-flex;
  align-items: center;
}

.action-separator {
  color: #ccc;
  margin: 0 0.1rem;
}

.hidden {
  display: none;
}

/* Utility Classes */
.has-background-light {
  background-color: var(--prof-surface) !important;
}

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

.has-text-light {
  color: var(--prof-text-light) !important;
}

.is-shadowless {
  box-shadow: none !important;
}

.is-rounded {
  border-radius: var(--prof-border-radius) !important;
}

.is-rounded-lg {
  border-radius: var(--prof-border-radius-lg) !important;
}

/* Animation classes for enhanced UX */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for better accessibility */
.button:focus-visible,
.input:focus-visible,
.textarea:focus-visible,
.select select:focus-visible {
  outline: 2px solid var(--prof-primary);
  outline-offset: 2px;
}

/* Responsive Design Helpers */
@media (max-width: 768px) {
  .card-content {
    padding: 1rem;
  }
  
  .modal-card {
    max-width: 95vw;
    margin: 1rem;
  }
  
  .navbar-item {
    border-radius: 0;
  }
}

/* Print styles */
@media print {
  .card,
  .notification,
  .table {
    box-shadow: none !important;
    border: 1px solid var(--prof-border) !important;
  }
  
  .button {
    box-shadow: none !important;
  }
}