.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
}

.input-readonly {
  background-color: var(--bg-light) !important;
  cursor: not-allowed;
}

.form-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -4px;
}

.btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--bg-light);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: #e4e6eb;
}

.btn-block {
  width: 100%;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-top: 8px;
}

.alert.success {
  background-color: rgba(66, 183, 42, 0.1);
  color: var(--success);
  border: 1px solid rgba(66, 183, 42, 0.2);
}

.alert.error {
  background-color: rgba(240, 40, 73, 0.1);
  color: var(--error);
  border: 1px solid rgba(240, 40, 73, 0.2);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card:hover::before {
  opacity: 0.3;
}

.stat-card-gradient.stat-card-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stat-card-gradient.stat-card-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.stat-card-gradient.stat-card-success {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: white;
}

.stat-card-gradient.stat-card-warning {
  background: linear-gradient(135deg, #fbc531 0%, #e55039 100%);
  color: white;
}

.stat-card-gradient.stat-card-error {
  background: linear-gradient(135deg, #fa8bff 0%, #2bd2ff 52%, #2bff88 90%);
  color: white;
}

.stat-card-gradient .stat-value,
.stat-card-gradient .stat-label {
  color: white !important;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.stat-icon-primary,
.stat-icon-secondary,
.stat-icon-success,
.stat-icon-warning,
.stat-icon-error {
  background: transparent;
}

.dashboard-card-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.dashboard-card-hero .card-header {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card-success .stat-value {
  color: var(--success);
}

.stat-card-warning .stat-value {
  color: var(--warning);
}

.stat-card-error .stat-value {
  color: var(--error);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.dashboard-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
}

.dashboard-card-full {
  grid-column: 1 / -1;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

.card-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-group input {
  flex: 1;
}

.qr-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#qrLoading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  color: var(--text-secondary);
}

#qrLoading i {
  font-size: 32px;
  color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#qrLoading span {
  font-size: 14px;
  font-weight: 500;
}

#qrError {
  max-width: 300px;
  text-align: center;
  padding: 16px;
  margin: 0;
}

.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--white) 0%, var(--bg-light) 100%);
  border-radius: var(--radius-md);
  margin-top: 16px;
  border: 2px dashed var(--neutral-300);
  transition: all 0.3s ease;
}

.qr-wrapper:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
}

.qr-image {
  width: 280px;
  height: 280px;
  max-width: 100%;
  border-radius: var(--radius-md);
  background-color: var(--white);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--neutral-200);
  transition: all 0.3s ease;
}

.qr-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.device-status {
  margin-top: 20px;
  padding: 16px;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  flex-shrink: 0;
}

.status-dot.connected {
  background-color: var(--success);
  box-shadow: 0 0 0 4px rgba(66, 183, 42, 0.2);
}

.status-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.char-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.sms-count {
  font-weight: 600;
  color: var(--warning);
}

.jobs-list {
  max-height: 500px;
  overflow-y: auto;
}

.job-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.job-item:last-child {
  border-bottom: none;
}

.job-item:hover {
  background-color: var(--bg-light);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.job-to {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.job-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.job-status.success {
  background-color: rgba(66, 183, 42, 0.1);
  color: var(--success);
}

.job-status.warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.job-status.error {
  background-color: rgba(240, 40, 73, 0.1);
  color: var(--error);
}

.job-message {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.job-date {
  color: var(--text-secondary);
  font-size: 12px;
}

.api-keys-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.api-key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.api-key-item:hover {
  background-color: #e4e6eb;
}

.api-key-info {
  flex: 1;
  min-width: 0;
}

.api-key-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.api-key-value {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  word-break: break-all;
}

.api-key-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.code-block {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0;
}

.code-block code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.code-inline {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 500;
}

.code-example {
  margin-bottom: 24px;
}

.code-example:last-child {
  margin-bottom: 0;
}

.code-example h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.info-list {
  list-style: none;
  padding-left: 0;
  margin: 16px 0;
}

.info-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 14px;
}

.info-list li::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: var(--primary);
  font-weight: bold;
}

.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Icons Font Awesome integration */
.brand-icon,
.nav-link i,
.auth-icon,
.card-title i,
label i,
.btn i {
  margin-right: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
}

/* Recipients textarea */
.recipients-textarea {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
  min-height: 200px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  transition: var(--transition);
}

.recipients-textarea:hover {
  border-color: #B0B3B8;
  background-color: var(--white);
}

.recipients-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background-color: var(--white);
  outline: none;
}

.recipients-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  text-decoration: underline;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-link:hover {
  color: var(--primary-dark);
  background-color: var(--primary-light);
  text-decoration: none;
}

/* Character counter */
.char-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.sms-count {
  color: var(--primary);
  font-weight: 600;
}

/* Device setup */
.device-setup-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .device-setup-wrapper {
    grid-template-columns: 1fr;
  }
}

.qr-container {
  text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--white));
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
  transition: var(--transition);
}

.qr-container:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.qr-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background-color: var(--white);
  padding: 16px;
}

.device-info {
  padding: 8px;
}

.device-info h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
}

.instructions-list {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 2;
}

.instructions-list li {
  margin-bottom: 8px;
}

.device-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.status-disconnected {
  color: var(--error);
  font-size: 10px;
  animation: pulse 2s ease-in-out infinite;
}

.status-connected {
  color: var(--success);
  font-size: 10px;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Send progress */
.send-progress {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--white));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.4);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* Stats in sidebar */
.stat-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.stat-item:hover {
  background-color: var(--bg-secondary);
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
  border-radius: var(--radius-md);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-error {
  color: var(--error);
}

.stat-success {
  color: var(--success);
}

.stat-warning {
  color: var(--warning);
}

/* Send actions */
.send-actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.send-actions .btn {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.send-actions .btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

/* File input styling */
input[type="file"] {
  display: none;
}

/* Additional form styling */
.form-group input[type="number"] {
  -moz-appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Card hover effects */
.dashboard-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
  transform: translateY(-4px);
}

/* Loading spinner */
.loading-state i.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Smooth transitions for all interactive elements */
button,
a,
input,
textarea,
select {
  transition: var(--transition);
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Disabled state styling */
button:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--bg-secondary);
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 500px;
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 16px 20px;
  z-index: 10000;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid var(--primary);
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification.toast-success {
  border-left-color: var(--success);
  background-color: var(--success-light);
}

.toast-notification.toast-error {
  border-left-color: var(--error);
  background-color: var(--error-light);
}

.toast-notification.toast-info {
  border-left-color: var(--primary);
  background-color: var(--primary-light);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-content i {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-success .toast-content i {
  color: var(--success);
}

.toast-error .toast-content i {
  color: var(--error);
}

.toast-info .toast-content i {
  color: var(--primary);
}

.toast-content span {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .toast-notification {
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
    transform: translateY(-100px);
  }
  
  .toast-notification.show {
    transform: translateY(0);
  }
}

