@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --canvas: #ffffff;
  --canvas-soft: #fafafa;
  --canvas-soft-2: #f4f4f4;
  --canvas-night: #1c1c1c;
  --border-color: #dfdfdf;
  --border-strong: #c7c7c7;
  --text-main: #171717;
  --text-secondary: #212121;
  --text-muted: #707070;
  --text-faint: #9a9a9a;
  --accent-primary: #3ecf8e;
  --accent-hover: #24b47e;
  --accent-soft: #eefbf4;
  --accent-purple: #644fc1;
  --accent-purple-soft: #eddbf9;
  --accent-success: #24b47e;
  --accent-danger: #d94040;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--canvas);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.glass-panel {
  background: var(--canvas);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
  line-height: 1.6;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--text-secondary);
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--canvas-soft);
}

.content-area {
  padding: 32px;
  flex: 1;
}

.sidebar {
  width: 280px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background: var(--canvas);
}

.sidebar-brand {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 4px 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.25rem;
}

.nav-item:hover {
  background: var(--canvas-soft);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--canvas-soft);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.top-header {
  height: 76px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--text-main);
}

.btn-danger {
  background: #fff5f5;
  color: var(--accent-danger);
  border-color: #f5cccc;
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: #ffffff;
  border-color: var(--accent-danger);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--canvas);
}

.alert-danger {
  background: #fff5f5;
  color: #b42318;
  border-color: #f5cccc;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #c7ebd7;
}

.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.42);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-modal {
  background: var(--canvas);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-lg);
}

.custom-modal-overlay.show .custom-modal {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: #fff5f5;
  color: var(--accent-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  border: 1px solid #f5cccc;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.modal-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 1rem;
}

.modal-actions button,
.modal-actions a {
  flex: 1;
  padding: 0.75rem;
  font-weight: 600;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.4);
  backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.show {
  opacity: 1;
  visibility: visible;
}

.btn-mobile-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0;
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .top-header {
    padding: 0 1.5rem;
  }

  .content-area {
    padding: 1.5rem;
  }

  .btn-mobile-menu {
    display: block;
    margin-right: 0.5rem;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 14px;
  }

  h2 {
    font-size: 1.35rem !important;
    margin-bottom: 1.25rem !important;
  }

  h3 {
    font-size: 1.15rem !important;
  }

  .top-header {
    height: 60px;
    padding: 0 1rem;
  }

  .header-title {
    font-size: 1.1rem;
  }

  .content-area {
    padding: 1rem;
  }

  .glass-panel {
    padding: 1.25rem !important;
    border-radius: 16px;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .btn i {
    font-size: 16px !important;
  }

  .header-actions img {
    width: 28px !important;
    height: 28px !important;
  }

  .header-actions span {
    display: none;
  }

  .custom-modal {
    padding: 1.5rem;
    width: 95%;
    border-radius: 16px;
  }

  .modal-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 24px;
    margin-bottom: 1rem !important;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-text {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }
}
