/* MikroTik Panel - Main CSS */
:root {
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --secondary-color: #764ba2;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-900: #1e293b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--gray-50);
}

.app {
  min-height: 100vh;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Loading Animation */
.loading {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ALY Bilişim Login Styles */
.aly-login-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
}
.aly-login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}
.aly-login-form {
  background: white;
  padding: 3rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(102,126,234,0.08);
  min-width: 340px;
  max-width: 400px;
  width: 100%;
}
.aly-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  text-align: center;
}
.aly-subtitle {
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}
.aly-form-group {
  margin-bottom: 1.5rem;
}
.aly-form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #667eea;
}
.aly-form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  background: #f8fafc;
}
.aly-btn {
  width: 100%;
  padding: 0.85rem;
  background: #38bdf8;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.aly-btn:hover {
  background: #0ea5e9;
}
.aly-api-status {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #64748b;
  text-align: center;
}
.aly-social-links {
  margin-top: 2rem;
  text-align: center;
}
.aly-social-links a {
  color: #38bdf8;
  margin: 0 0.75rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}
.aly-social-links a:hover {
  text-decoration: underline;
}
.aly-login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  color: white;
  flex-direction: column;
  position: relative;
}
.aly-brand {
  text-align: center;
}
.aly-logo {
  max-width: 180px;
  margin-bottom: 2rem;
}
.aly-brand h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}
.aly-slogan {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #bae6fd;
}
.aly-desc {
  font-size: 1rem;
  color: #e0e7ef;
  margin-bottom: 2rem;
}
.aly-illustration {
  margin-top: 2rem;
  text-align: center;
}
@media (max-width: 900px) {
  .aly-login-wrapper {
    flex-direction: column;
  }
  .aly-login-right {
    min-height: 300px;
    padding: 2rem 0;
  }
}

/* Settings Page Styles */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
}

.setting-section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.setting-section h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
  font-size: 1.25rem;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.setting-group input[type="number"],
.setting-group input[type="text"],
.setting-group input[type="password"],
.setting-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.setting-group input:focus,
.setting-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-group span {
  color: var(--gray-900);
}

.api-test-container {
  background: var(--gray-50);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.test-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.test-form input {
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
}

.btn-test {
  grid-column: 1 / -1;
  background: var(--warning-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-test:hover {
  background: #d97706;
}

.test-result {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 1rem;
  min-height: 60px;
}

.test-result .success {
  color: var(--success-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.test-result .error {
  color: var(--error-color);
  font-weight: 600;
}

.test-result .loading {
  color: var(--primary-color);
  font-style: italic;
}

.connection-info {
  background: var(--gray-50);
  border-radius: 4px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.connection-info p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--gray-500);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-secondary:hover {
  background: #475569;
}

@media (max-width: 640px) {
  .test-form {
    grid-template-columns: 1fr;
  }
  
  .settings-actions {
    flex-direction: column;
  }
}