/* Base Styles */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --light-color: #f8f9fa;
    --dark-color: #202124;
    --gray-color: #5f6368;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: auto;
    margin: 0 auto;
    padding: 0 20px;
    width: auto;
}

/* Header */
header {
    background-color: white;
    width: auto;
    max-width: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* ========== LOGIN CARD SPECIFIC STYLES ========== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.login-header {
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.login-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: white;
  border-radius: 20px 20px 0 0;
}

.login-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.login-header p {
  opacity: 0.9;
  font-size: 0.95rem;
  font-weight: 400;
}

.login-body {
  padding: 2rem 1.5rem;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: #f8fafc;
}

.login-form input:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
  background-color: white;
}

.login-form .btn-login {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-form .btn-login:hover {
  background: linear-gradient(135deg, #3a56d4 0%, #2e086e 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.login-form .btn-login:active {
  transform: translateY(0);
}

.login-footer {
  padding: 1rem 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #718096;
  border-top: 1px solid #f1f5f9;
}

.login-footer a {
  color: #4361ee;
  font-weight: 500;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: #3a0ca3;
  text-decoration: underline;
}

/* Error Message Styling */
.alert-error {
  padding: 0.75rem 1rem;
  background: #fff5f5;
  color: #e53e3e;
  border-left: 4px solid #e53e3e;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .login-header {
    padding: 1.5rem 1rem;
  }
  
  .login-header h1 {
    font-size: 1.5rem;
  }
  
  .login-body {
    padding: 1.5rem 1rem;
  }
  
  .login-form input {
    padding: 0.65rem 0.9rem;
  }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

tr:hover {
    background-color: #f9f9f9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3367d6;
}

.btn-edit {
    background-color: var(--secondary-color);
    color: white;
}

.btn-edit:hover {
    background-color: #2d9249;
}

.btn-delete {
    background-color: var(--accent-color);
    color: white;
}

.btn-delete:hover {
    background-color: #d33426;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* Utility Classes */
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* Admin Header */
.admin-header {
    background-color: white;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.admin-header .logo {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header .logo i {
    font-size: 1.8rem;
}

.admin-header .nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.admin-header .nav-links a {
    text-decoration: none;
    color: var(--gray-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.admin-header .nav-links a:hover,
.admin-header .nav-links a.active {
    color: var(--primary-color);
}

.admin-header .nav-links a.logout {
    color: var(--accent-color);
}

.admin-header .nav-links a.logout:hover {
    color: #d33426;
}

/* Admin Footer */
.admin-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.admin-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-footer .version {
    color: #aaa;
}
/* Edit Page Styles */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.short-url-display {
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: monospace;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}
/* Settings Page Styles */
.settings-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 10px;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check input {
    margin: 0;
}

.theme-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.preview-box {
    padding: 15px;
    border-radius: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.preview-box h4 {
    margin-top: 0;
    text-align: center;
}

.preview-content {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.preview-header {
    height: 15px;
    background: var(--primary-color);
}

.preview-body {
    height: 60px;
    background: var(--body-bg);
}

.form-actions {
    margin-top: 30px;
    text-align: right;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* Dark mode variables */
[data-theme="dark"] {
    --body-bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-primary: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: #444;
    --input-bg: #3d3d3d;
    --card-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

/* Light mode variables */
[data-theme="light"] {
    --body-bg: #f9f9f9;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --input-bg: #ffffff;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.05);
}