/* Basic styles */
:root {
  --foreground-rgb: 0, 0, 0;
  --background-rgb: 255, 255, 255;
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #f3f4f6;
  --text-color: #374151;
  --light-gray: #e5e7eb;
  --dark-gray: #6b7280;
  --error-color: #ef4444;
  --success-color: #10b981;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: rgb(var(--foreground-rgb));
  background: rgb(var(--background-rgb));
  font-size: 16px;
  line-height: 1.5;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: #1e40af;
  color: white;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

.sidebar-nav {
  margin-top: 1.5rem;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s;
}

.sidebar-nav a:hover {
  background-color: #1d4ed8;
}

.sidebar-nav a.active {
  background-color: #2563eb;
}

.sidebar-nav i {
  margin-right: 0.75rem;
}

.main-content {
  flex: 1;
  overflow: auto;
}

.content-wrapper {
  padding: 1.5rem;
}

/* Table styles */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.table-header h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.add-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 0.25rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.add-button:hover {
  background-color: var(--primary-hover);
}

.add-button i {
  margin-right: 0.5rem;
}

.data-table {
  width: 100%;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--dark-gray);
  background-color: var(--secondary-color);
  border-bottom: 1px solid var(--light-gray);
}

.data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-color);
  border-bottom: 1px solid var(--light-gray);
}

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

.data-table .empty-message {
  padding: 1rem;
  text-align: center;
  color: var(--dark-gray);
}

/* Action buttons */
.action-buttons {
  display: flex;
  justify-content: flex-end;
}

.edit-button, .delete-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.875rem;
}

.edit-button {
  color: var(--primary-color);
  margin-right: 1rem;
}

.delete-button {
  color: var(--error-color);
}

/* Forms */
.form-container {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .form-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--light-gray);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

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

.btn-secondary {
  background-color: white;
  color: var(--text-color);
  border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  background-color: white;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: bold;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--dark-gray);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--light-gray);
  gap: 0.75rem;
}

/* Messages */
.error-message, .success-message {
  /* Skrijemo statična obvestila, ker uporabljamo dinamična */
  display: none !important;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

.error-message {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.success-message {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Loading */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 0;
}

.loading-spinner {
  border: 4px solid rgba(229, 231, 235, 0.5);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stats-card {
  background-color: var(--light-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-card-blue {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
}

.stats-card-green {
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
}

.stats-card-purple {
  background-color: #f5f3ff;
  border: 1px solid #ede9fe;
}

.stats-title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stats-title-blue { color: #1e40af; }
.stats-title-green { color: #065f46; }
.stats-title-purple { color: #5b21b6; }

.stats-value {
  font-size: 1.875rem;
  font-weight: bold;
}

.stats-value-blue { color: #2563eb; }
.stats-value-green { color: #059669; }
.stats-value-purple { color: #7c3aed; }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-green {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-red {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Dashboard statistics */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--light-gray);
}

.stat-title {
  font-size: 0.875rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.dashboard-section {
  margin-bottom: 2rem;
}

/* Quick links */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.quick-link-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  background-color: white;
  border: 1px solid var(--light-gray);
  border-radius: 0.5rem;
  padding: 1rem;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.quick-link-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quick-link-button i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Statistics styling */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  flex: 1;
  min-width: 200px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.stats-title, .chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.stats-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-color);
}

.stats-chart-container, .stats-pie-container, .stats-table-container {
  flex: 1;
  min-width: 300px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.chart {
  height: 250px;
  margin-top: 1rem;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  height: 100%;
  gap: 0.5rem;
}

.chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.chart-bar {
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 0.25rem 0.25rem 0 0;
  position: relative;
  max-width: 40px;
  margin: 0 auto;
}

.chart-bar-value {
  position: absolute;
  top: -20px;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-color);
}

.chart-bar-label {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  color: var(--dark-gray);
  text-align: center;
}

.pie-chart-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 1rem;
}

.pie-chart {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: #e5e7eb;
  overflow: hidden;
}

.pie-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

.pie-segment.guests {
  background-color: #3b82f6;
}

.pie-segment.employees {
  background-color: #10b981;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
}

.legend-color.guests {
  background-color: #3b82f6;
}

.legend-color.employees {
  background-color: #10b981;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.stats-table th, .stats-table td {
  text-align: left;
  padding: 0.75rem;
  font-size: 0.875rem;
}

.stats-table th {
  background-color: var(--secondary-color);
  font-weight: 600;
}

.stats-table tr {
  border-bottom: 1px solid var(--light-gray);
}

.stats-table tr:last-child {
  border-bottom: none;
}

.empty-chart {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-gray);
  font-style: italic;
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-danger {
  background-color: #fee2e2;
  color: #b91c1c;
}

.badge-warning {
  background-color: #fef9c3;
  color: #854d0e;
}

/* Validity date styles */
.date-expired {
  color: #b91c1c;
  font-weight: 600;
}

.date-soon {
  color: #854d0e;
  font-weight: 600;
}

.legend {
  font-size: 0.95rem;
  color: var(--dark-gray);
}

.chart-bars.hours {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  height: 250px;
  align-items: flex-end;
  background-image: linear-gradient(to top, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 100% 25px;
  background-position: 0 bottom;
  padding-bottom: 25px;
  position: relative;
}

.chart-bars.hours .chart-bar-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-bars.hours .chart-bar {
  width: 80%;
  background-color: var(--primary-color);
  min-height: 1px;
  position: relative;
  transition: height 0.3s;
  border-radius: 3px 3px 0 0;
}

.chart-bars.hours .chart-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-color);
}

.chart-bars.hours .chart-label {
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--text-color);
  text-align: center;
}

.stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  flex: 1;
  min-width: 150px;
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--dark-gray);
  font-size: 0.9rem;
}

.period-selector {
  display: flex;
  justify-content: center;
}

.btn-group {
  display: flex;
  border-radius: 0.5rem;
  overflow: hidden;
}

.btn-group .btn {
  border-radius: 0;
  margin: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-group .btn:first-child {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.btn-group .btn:last-child {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  border-right: none;
}

.mt-6 {
  margin-top: 1.5rem;
}

.empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--dark-gray);
  font-style: italic;
}

/* QR code */
.qr-code-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.qr-code-container:hover {
  opacity: 1;
}

.qr-code {
  padding: 8px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-bars.days {
  display: flex;
  align-items: flex-end;
  height: 200px;
  gap: 1rem;
  background-image: linear-gradient(to top, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 100% 25px;
  background-position: 0 bottom;
  padding-bottom: 25px;
  margin-bottom: 80px;
  overflow-x: auto;
  margin-top: 40px;
}

.chart-bars.days .chart-bar-container {
  flex: 1;
  min-width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
}

.chart-bars.days .chart-bar {
  width: 70%;
  max-width: 40px;
  background-color: var(--primary-color);
  min-height: 1px;
  position: relative;
  transition: height 0.3s;
  border-radius: 3px 3px 0 0;
}

.chart-bars.days .chart-bar-value {
  position: absolute;
  top: -25px;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-color);
}

/* Current status table styling */
.current-status-table {
  margin-top: 1rem;
  overflow-x: auto;
}

.empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--dark-gray);
  font-style: italic;
}

.mt-6 {
  margin-top: 1.5rem;
}

/* Dropdown Menu */
.menu-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.dropdown-icon {
  transition: transform 0.3s ease;
}

.dropdown-icon.open {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  background-color: rgba(0, 0, 0, 0.1);
}

.submenu li a {
  padding-left: 2.5rem;
}

.submenu li a.active {
  background-color: rgba(37, 99, 235, 0.5);
}

.submenu li a:hover {
  background-color: rgba(37, 99, 235, 0.3);
}

.chart-container {
  position: relative;
  min-height: 300px;
  max-height: 400px;
  margin: 20px 0;
}

.empty-chart {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--dark-gray);
  font-style: italic;
}

/* Validity Extension Buttons */
.validity-extension-buttons {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.validity-extension-buttons .btn-sm {
    padding: 2px 10px;
    font-size: 0.8rem;
    margin-right: 5px;
}

.validity-extension-buttons .btn-outline {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #555;
}

.validity-extension-buttons .btn-outline:hover {
    background-color: #f3f4f6;
    border-color: #a0aec0;
}

/* Notification System */
#notification-container {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 400px;
    max-width: 90%;
    pointer-events: none; /* Omogoči klike skozi container, vendar ne skozi obvestila */
}

.notification {
    background-color: white;
    color: #333;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                opacity 0.3s ease,
                box-shadow 0.3s ease;
    border-left: 6px solid #3b82f6;
    position: relative;
    overflow: hidden;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    pointer-events: auto; /* Omogoči interakcijo z obvestilom */
}

.notification:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.notification.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: notify-bounce 0.5s ease forwards;
}

.notification.hiding {
    transform: translateY(-30px) scale(0.9);
    opacity: 0;
}

@keyframes notify-bounce {
    0% { transform: translateY(-50px) scale(0.9); opacity: 0; }
    50% { transform: translateY(10px) scale(1.01); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.notification-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.notification-message {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    line-height: 1;
}

.notification-close:hover {
    color: #333;
}

.notification-info { border-left-color: #3b82f6; }
.notification-success { border-left-color: #10b981; }
.notification-warning { border-left-color: #f59e0b; }
.notification-error { border-left-color: #ef4444; }
.notification-entry { border-left-color: #8b5cf6; }
.notification-exit { border-left-color: #ec4899; }
.notification-update { border-left-color: #0ea5e9; }

@keyframes pulse-border {
    0% { border-left-width: 4px; }
    50% { border-left-width: 10px; }
    100% { border-left-width: 4px; }
}

.notification-entry {
    animation: pulse-border 1s ease;
}

.notification-exit {
    animation: pulse-border 1s ease;
}

/* Login Ripple Effect */
.login-btn {
    position: relative;
    overflow: hidden;
}

.login-btn .ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Content Header & Logout Button */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logout-button .btn-outline {
    background-color: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-button .btn-outline:hover {
    background-color: #e74c3c;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.username {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.username i {
    margin-right: 8px;
    color: #3b82f6;
    font-size: 16px;
} 