:root {
  /* Premium Color Palette (Vibrant but Professional) */
  --primary-color: #0052cc; 
  --primary-light: #4c9aff;
  --primary-dark: #0747a6;
  --secondary-color: #ff5630; 
  --success-color: #36b37e;
  --warning-color: #ffab00;
  --danger-color: #de350b;

  /* Neutral scale */
  --bg-color: #f4f5f7;
  --surface-color: #ffffff;
  --text-primary: #172b4d;
  --text-secondary: #5e6c84;
  --border-color: #dfe1e6;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

  /* New Premium Tokens */
  --premium-gradient: linear-gradient(135deg, #0052cc 0%, #0747a6 100%);
  --premium-shadow: 0 20px 40px rgba(0, 82, 204, 0.15);
  --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  
  /* Typography */
  --font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
}

/* Custom Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}
.justify-between {
  justify-content: space-between;
}
.items-center {
  align-items: center;
}
.grid {
  display: grid;
}
.gap-4 {
  gap: 1rem;
}
.p-4 {
  padding: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  box-shadow: 0 4px 10px rgba(0, 82, 204, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 82, 204, 0.3);
}

.btn-success { background: var(--success-color); color: white; }
.btn-success:hover { background: #2d9469; transform: translateY(-2px); }

.btn-danger { background: var(--danger-color); color: white; }
.btn-danger:hover { background: #bf2d0a; transform: translateY(-2px); }

.btn-warning { background: var(--warning-color); color: #855d00; }
.btn-warning:hover { background: #e69a00; transform: translateY(-2px); }

.card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Header */
.main-header {
  background: var(--surface-color);
  padding: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-light)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 2rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, #0052cc, #2684ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* Footer */
footer {
  background: #091e42;
  color: white;
  padding: 4rem 0;
  margin-top: auto;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 70px);
}

.sidebar {
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1rem;
}

.sidebar-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: #e6f3ff;
  color: var(--primary-color);
}

.main-content {
  padding: 2rem;
  max-width: 1200px;
}

/* Premium Tables */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

tr:hover td {
    background-color: #fcfdfe;
}

/* Skeleton Screens */
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

.breadcrumb span::after {
    content: "/";
    margin-left: 8px;
    opacity: 0.5;
}

.breadcrumb span:last-child::after {
    display: none;
}

.breadcrumb span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Badge */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-primary {
  background: #e6f3ff;
  color: var(--primary-color);
}
.badge-success {
  background: #e3fcef;
  color: var(--success-color);
}
.badge-warning {
  background: #fff0b3;
  color: #b38600;
}

.badge-danger {
  background: #ffebe6;
  color: var(--danger-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 80px 1fr;
    }
    .sidebar-menu a span, .sidebar-menu p {
        display: none;
    }
    .grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* Em produção, um menu hambúrguer seria melhor */
    }
    .grid {
        grid-template-columns: 1fr !important;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .main-header .container {
        padding: 0 1rem;
    }
    .user-menu div {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.4s ease-out forwards;
}
