/* ============================================
   LOGIN PAGE STYLES
   ============================================ */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {

    --primary-color: #4f46e5;
    --secondary-color: #4338ca;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --light-color: #f8fafc;
    --dark-color: #1f2937;
    --card-border: #e5e7eb;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}


.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.animated-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-50px) rotate(180deg);
    }
}

/* Social icons floating in background */
.social-icons-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.social-icons-bg .bg-icon {
    position: absolute;
    opacity: 0.12;
    color: #ffffff;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.15));
    animation: floatSlow 22s ease-in-out infinite;
    transition: opacity .3s ease;
}

/* Big icons */
.social-icons-bg .icon-fb { font-size: 140px; top: 8%; left: 6%; animation-delay: 0s; }
.social-icons-bg .icon-ig { font-size: 160px; bottom: 10%; right: 8%; animation-delay: 3s; }
.social-icons-bg .icon-tt { font-size: 120px; top: 55%; right: 18%; animation-delay: 6s; }

/* Smaller duplicates for depth */
.social-icons-bg .small.icon-fb { font-size: 90px; bottom: 20%; left: 18%; animation-delay: 1.5s; opacity: .10; }
.social-icons-bg .small.icon-ig { font-size: 80px; top: 20%; right: 28%; animation-delay: 4.5s; opacity: .10; }
.social-icons-bg .small.icon-tt { font-size: 100px; bottom: 35%; left: 70%; animation-delay: 7.5s; opacity: .10; }

@keyframes floatSlow {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(0, -35px, 0) rotate(12deg) scale(1.03); }
}

/* Better contrast in dark mode */
@media (prefers-color-scheme: dark) {
  .social-icons-bg .bg-icon { color: rgba(255,255,255,0.9); opacity: 0.09; }
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .social-icons-bg .icon-fb { font-size: 110px; }
  .social-icons-bg .icon-ig { font-size: 130px; }
  .social-icons-bg .icon-tt { font-size: 100px; }
}

@media (max-width: 640px) {
  .social-icons-bg .bg-icon { opacity: 0.08; }
  .social-icons-bg .icon-fb { font-size: 80px; top: 6%; left: 4%; }
  .social-icons-bg .icon-ig { font-size: 90px; bottom: 8%; right: 4%; }
  .social-icons-bg .icon-tt { font-size: 70px; top: 60%; right: 10%; }
  .social-icons-bg .small { display: none; }
}

/* Corner icons layout */
.social-icons-bg .icon-tl,
.social-icons-bg .icon-tr,
.social-icons-bg .icon-bl,
.social-icons-bg .icon-br {
  position: absolute;
  animation: floatCorner 16s ease-in-out infinite;
}

.social-icons-bg .icon-tl { top: 18px; left: 18px; font-size: 84px; }
.social-icons-bg .icon-tr { top: 18px; right: 18px; font-size: 84px; }
.social-icons-bg .icon-bl { bottom: 18px; left: 18px; font-size: 84px; }
.social-icons-bg .icon-br { bottom: 18px; right: 18px; font-size: 84px; }

@keyframes floatCorner {
  0%, 100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(0,-6px,0); }
}

@media (max-width: 1024px) {
  .social-icons-bg .icon-tl,
  .social-icons-bg .icon-tr,
  .social-icons-bg .icon-bl,
  .social-icons-bg .icon-br { font-size: 72px; }
}

@media (max-width: 640px) {
  .social-icons-bg .icon-tl { top: 12px; left: 12px; font-size: 56px; }
  .social-icons-bg .icon-tr { top: 12px; right: 12px; font-size: 56px; }
  .social-icons-bg .icon-bl { bottom: 12px; left: 12px; font-size: 56px; }
  .social-icons-bg .icon-br { bottom: 12px; right: 12px; font-size: 56px; }
}


/* Orbiting social icons around the login box */
.floating-social {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.floating-social .orbit-rotator {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  animation: orbitSpin 38s linear infinite;
}

.floating-social .orbit-icon {
  position: absolute;
  font-size: 40px;
  color: rgba(255,255,255,.92);
  opacity: .22;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.2));
  /* polar placement using CSS variables */
  --angle: 0deg;       /* custom per icon */
  --radius: 220px;     /* custom per icon */
  --delay: 0s;         /* custom per icon */
  transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle)));
  animation: bob 6.5s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes bob {
  0%, 100% { transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle))) translateY(0); }
  50% { transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle))) translateY(-8px); }
}

/* Dark mode subtlety */
@media (prefers-color-scheme: dark) {
  .floating-social .orbit-icon { color: rgba(255,255,255,.95); opacity: .18; }
}

/* Responsive: bring icons closer on small screens */
@media (max-width: 1024px) {
  .floating-social .orbit-icon { font-size: 34px; }
}
@media (max-width: 640px) {
  .floating-social .orbit-rotator { animation-duration: 46s; }
  .floating-social .orbit-icon { font-size: 28px; opacity: .18; }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(79,70,229,0.15);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.login-logo {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 40px 20px;
}


.login-logo .brand-logo {
    width: 72px !important;
    height: 72px !important;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    margin: 0 auto 16px;
    border: 2px solid rgba(255,255,255,0.7);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}


.logo-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.login-logo h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-logo p {
    opacity: 0.9;
    font-size: 0.95rem;
}


.form-container {
    padding: 40px 30px;
}

.form-container h2 {
    color: var(--dark-color);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}


.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--card-border);
    background: #f9fafb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-group input.error {
    border-color: var(--error-color);
}


.password-input {
    position: relative;
}

.password-input input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 1.1rem;
}

.toggle-password:hover {
    color: var(--primary-color);
}


.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}


.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 6px 16px rgba(79,70,229,0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--secondary-color);
    box-shadow: 0 10px 22px rgba(79,70,229,0.45);
}

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

.btn-block {
    display: block;
    width: 100%;
}


.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-footer p {
    color: #666;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   LOADING & TOAST STYLES
   ============================================ */


.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}



.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.loading-content .spinner {
    position: static;
    transform: none;
    animation: spin 1s linear infinite;
}


@keyframes spinCentered {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

.loading-text {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
}


.toast-container {
    position: fixed;
    top: 65px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    position: relative;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.toast-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.toast-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.toast-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    color: inherit;
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }

    .login-logo {
        padding: 30px 15px;
    }

    .login-logo h1 {
        font-size: 1.5rem;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .form-container {
        padding: 30px 20px;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .shape {
        display: none;
    }
}






#server-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}


.server-card {
    display: block;
    cursor: pointer;
    flex: 1 1 200px;
    min-width: 200px;
    transition: transform 0.2s ease-in-out;
}

.server-card:hover {
    transform: translateY(-3px);
}

.server-card input[type="radio"] {
    display: none;
}

.server-card .server-card-body {
    padding: 15px;
    position: relative;
    border: 2px solid #e3e6ef;
    border-radius: 10px;
    background: #fff;
    transition: all 0.2s ease-in-out;
}

.server-card:hover .server-card-body {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.server-card .server-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
}

.server-card .server-desc {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
    min-height: 3em;
}

.server-card .server-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}


.server-card input[type="radio"]:checked + .server-card-body {
    border-color: var(--primary-color);
    background-color: #f0f3ff;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.1);
}


.server-card input[type="radio"]:checked + .server-card-body::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background-color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}


.order-summary { background: #f9fafb; border: 1px dashed #e5e7eb; padding: 12px; border-radius: 8px; }


/* ============================================
   Modern UI Components (Shadcn/UI Inspired)
   ============================================ */

.card-ui {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.table-filters {
    display: flex;
    gap: 12px;
}

.table-filters .form-control {
    height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.table-filters .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}


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

.data-table.modern th,
.data-table.modern td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.data-table.modern thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.data-table.modern tbody tr:hover {
    background-color: #f9fafb;
}

.data-table.modern .actions-cell {
    text-align: right;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.data-table.modern .btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
}


.logs-container {
    max-height: 400px;
    overflow-y: auto;
    background-color: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    color: #111827;
}

.log-item {
    padding: 4px 0;
    border-bottom: 1px solid #e5e7eb;
}

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



.modal .modal-content.success { border-top: 4px solid #22c55e; }
.modal .modal-body.centered { text-align: center; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display:flex; align-items:center; justify-content:center; margin: 8px auto 12px; font-size: 28px; }
.status-icon.success { background: #e8f7ef; color: #16a34a; }
.modal .modal-body .primary-line { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.modal .modal-body .secondary-line { color: #6b7280; }
.modal .order-mini { margin-top: 12px; background:#f9fafb; border:1px dashed #e5e7eb; padding:10px; border-radius:8px; text-align:left; }
