@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;800&display=swap');

:root {
  --bg-900: #0b1220;
  --bg-800: #0f172a;
  --bg-700: #111827;
  --bg-600: #1f2937;
  --input-bg: #374151;
  --input-border: #4b5563;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #0ea5e9;
  --primary-600: #0284c7;
  --nav-active-bg: #0ea5e9;
  --nav-active-text: #0b1220;
  --title: #dbeafe;
  --danger: #ef4444;
  --danger-bg: #ef4444;
  --danger-text: #fecaca;
  --success: #10b981;
  --success-bg: #10b981;
  --success-text: #bbf7d0;
  --border-color: rgba(255, 255, 255, .08);
}

body {
    color: var(--text);
    background-color: #0f172a;
    font-family: 'Vazirmatn', Arial, sans-serif;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    font-size: 14px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('gradient_horizontal_bg.jpg');
    background-size: cover;
    background-position: center center;
    z-index: -1; /* Ensure it stays behind content */
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 76vh;
}

.card-auth {
    background: var(--bg-700);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}

.card-auth .card-header {
    background: var(--bg-900);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card-auth .brand {
    color: #93c5fd;
    font-weight: 800;
}

.card-auth .card-body {
    padding: 28px;
    background: var(--bg-600);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.form-label {
    color: #cbd5e1;
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #fff;
    height: 48px;
    padding: 10px 14px;
    border-radius: 8px !important;
    width: 100%;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:focus {
    background: var(--input-bg);
    border-color: #60a5fa;
    box-shadow: 0 0 0 .25rem rgba(14, 165, 233, .2);
    color: #fff !important;
    caret-color: #fff;
    outline: none;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    padding: 10px 16px;
    height: 48px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--nav-active-text);
}

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.flash-container { margin-bottom: 20px; }
.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid;
    text-align: center;
    color: var(--text);
}
.flash.flash-error { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: #ef4444; font-weight: bold; }
.flash.flash-success { background-color: var(--success-bg); color: var(--success-text); border-color: var(--success); font-weight: bold; }

.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.w-100 { width: 100%; }

.link {
    color: #60a5fa;
    text-decoration: none;
}
.link:hover { text-decoration: underline; }
.text-muted { color: var(--muted) !important; }

/* Main App Styles */
.app-navbar{
  background: var(--bg-900);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
}
.brand{
  color: #93c5fd;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}
.top-nav .nav-link{
  color: #cbd5e1;
  border-radius: .5rem;
  margin: 0 .25rem;
  padding: .5rem 1rem;
  transition: all .15s ease;
  text-decoration: none;
}
.top-nav .nav-link.active{
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  font-weight: 700;
}
.top-nav .nav-link:hover{
  color: #fff;
  background: rgba(255,255,255,.06);
  
}
.auth-links{
  margin-right: auto;
  margin-left: 1rem;
}
.auth-links a{
  color: #cbd5e1;
  text-decoration: none;
  margin: 0 .5rem;
}
.auth-links a.text-danger{
  color: #ef4444 !important;
}

.shell{
  max-width: 1060px;
  margin: 24px auto 80px;
  padding: 0 16px;
}
.panel{
  background: var(--bg-700);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.inner{
  background: var(--bg-600);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
}
.page-title {
    font-weight: 800;
    color: var(--title);
    text-align: center;
    font-size: 28px;
    margin-bottom: 8px;
}
.page-sub {
    text-align: center;
    color: var(--muted);
    margin-bottom: 28px;
}

.input-group { display: flex; }
.input-group .form-control { border-top-right-radius: 3; border-bottom-right-radius: 3;}
.input-group-text {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #cbd5e1;
    padding: 0 14px;
    border-right: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.input-group .form-control {
    border-radius: 8px !important;
}

/* Admin & My Reservations specific styles */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 1rem;
    border-right: 3px solid var(--primary);
    padding-right: 10px;
}
.card-res {
    background: var(--bg-600);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.badge { 
    display: inline-block; 
    padding: .35em .65em; 
    font-size: .75em; 
    font-weight: 700; 
    line-height: 1; 
    color: #fff; 
    text-align: center; 
    white-space: nowrap; 
    vertical-align: baseline; 
    border-radius: .25rem; 
}
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #0dcaf0 !important; }
.text-dark { color: #212529 !important; }
.invitees-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }

@media (max-width: 768px) {
  .auth-page {
    padding: 16px;
  }
  .card-auth {
    max-width: 100%;
  }

  /* Rotate background for vertical mobile view */
  body::before {
    width: 100vw;
    height: 104vh;
    background-image: url('gradient_vertical_bg.jpg');
    background-size: cover;
    background-position: center center;
    z-index: -1;
  }
}
