/* ===================================
   AGENDA PRO - Main Styles
   ================================= */

:root {
  /* Colors - Will be dynamically updated */
  --primary-color: #1a252f;
  --secondary-color: #2c3e50;
  --hover-color: #1a252f;
  --navbar-color: #2c3e50;
  --menu-text-color: #ffffff;
  --button-text-color: #ffffff;
  --action-button-color: #1a252f;
  --action-button-hover-color: #2c3e50;

  /* Neutral Colors */
  --white: #ffffff;
  --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;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Shadows */
  --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);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-size-base: 16px;

  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  --topbar-height: 70px;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* ===================================
   Reset & Base
   ================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===================================
   Loading Screen
   ================================= */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-screen p {
  margin-top: 20px;
  color: var(--gray-600);
}

/* ===================================
   Hidden Utility
   ================================= */
.hidden {
  display: none !important;
}

/* ===================================
   Login Page
   ================================= */
.login-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
}

.login-container {
  background: var(--white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  border-radius: 12px;
  object-fit: contain;
}

.login-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.875rem;
}

.login-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 37, 47, 0.1);
}

/* ===================================
   App Layout
   ================================= */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===================================
   Sidebar
   ================================= */
.sidebar {
  width: var(--sidebar-width);
  background: var(--navbar-color);
  color: var(--menu-text-color);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  position: relative;
  z-index: 1000;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.sidebar.collapsed .sidebar-logo {
  display: none;
}

.sidebar-toggle {
  color: var(--menu-text-color);
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  color: var(--menu-text-color);
  transition: var(--transition);
  position: relative;
}

.nav-item i {
  font-size: 1.25rem;
  width: 24px;
  margin-right: 1rem;
}

.sidebar.collapsed .nav-item span {
  display: none;
}

.nav-item:hover {
  background: var(--hover-color);
}

.nav-item.active {
  background: var(--primary-color);
  border-left: 4px solid var(--menu-text-color);
}

/* ===================================
   Main Content
   ================================= */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===================================
   Topbar
   ================================= */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: var(--shadow-sm);
}

.topbar-left h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--gray-100);
  color: var(--primary-color);
}

.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.user-menu-btn:hover {
  background: var(--gray-100);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-menu-btn span {
  font-weight: 500;
  color: var(--gray-700);
}

.user-menu-btn i {
  color: var(--gray-500);
  font-size: 0.75rem;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 0.5rem;
  z-index: 1000;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  border-radius: 6px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary-color);
}

.dropdown-menu hr {
  margin: 0.5rem 0;
  border: none;
  border-top: 1px solid var(--gray-200);
}

/* ===================================
   Page Content
   ================================= */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.page-content::-webkit-scrollbar {
  width: 8px;
}

.page-content::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.page-content::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ===================================
   Responsive
   ================================= */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    transform: translateX(-100%);
    z-index: 2000;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 1rem;
  }

  .page-content {
    padding: 1rem;
  }

  .user-menu-btn span {
    display: none;
  }
}

