/* Mikrotik Mobile Manager - Main Stylesheet */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    position: relative;
    padding-bottom: 0;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: max(env(safe-area-inset-top), 20px) 20px 20px 20px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 1001;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    position: relative;
}

.router-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.user-badge {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .user-badge {
        display: none; /* Hide user badge on mobile for space */
    }
}

.status-dot {
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.status-offline {
    background: #f44336;
    animation: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.router-info h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.router-info p {
    font-size: 12px;
    opacity: 0.8;
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.resource-card {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.resource-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.resource-card i {
    font-size: 20px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.9;
}

.resource-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.resource-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    padding: 20px;
    padding-top: calc(180px + max(env(safe-area-inset-top), 2.5vw));
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
    overflow-y: auto;
    scroll-padding-top: calc(180px + max(env(safe-area-inset-top), 2.5vw));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 8px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    scroll-margin-top: calc(220px + max(env(safe-area-inset-top), 2.5vw));
}

.content-section .card:first-of-type {
    margin-top: 5px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.card-body {
    padding: 20px;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

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

.list-item:hover {
    background: #f8f9fa;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #333;
}

.list-item-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.list-item-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f8f9fa;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

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

.btn-whatsapp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-height: 36px;
}

.btn-save-settings {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    min-width: 200px;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    transition: all 0.3s;
}

.btn-save-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-save-settings:disabled {
    transform: none;
    opacity: 0.6;
}

/* Card Footer */
.card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 12px 20px;
    border-radius: 0 0 12px 12px;
    text-align: right;
}

.card-footer .btn {
    margin-left: 8px;
    padding: 6px 16px;
    font-size: 13px;
    min-height: 32px;
    min-width: 80px;
}

.card-footer .btn:first-child {
    margin-left: 0;
}

/* WhatsApp Form Container */
.whatsapp-form-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.whatsapp-form-container .form-control {
    flex: 1;
}

.whatsapp-form-container .btn-whatsapp {
    flex-shrink: 0;
}

/* WhatsApp Alert Styles */
.whatsapp-alert {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    gap: 8px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.whatsapp-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.whatsapp-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.whatsapp-alert i {
    font-size: 16px;
    flex-shrink: 0;
}

.whatsapp-alert span {
    flex: 1;
}

.whatsapp-alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    flex-shrink: 0;
}

.whatsapp-alert-close:hover {
    background: rgba(0,0,0,0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WhatsApp Recipients List */
.whatsapp-recipients-list {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    max-height: 400px;
    overflow-y: auto;
}

.recipient-item {
    margin-bottom: 12px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.recipient-item:last-child {
    margin-bottom: 0;
}

.recipient-inputs {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.recipient-inputs .form-control {
    flex: 1;
    margin-bottom: 0;
    min-height: 44px;
}

.recipient-inputs .btn {
    flex-shrink: 0;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    font-size: 12px;
}

/* Mobile responsive for recipient inputs */
@media (max-width: 768px) {
    .recipient-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .recipient-inputs .form-control {
        width: 100%;
        margin-bottom: 0;
    }

    .recipient-inputs .btn {
        width: auto;
        min-width: 40px;
        height: 36px;
        padding: 8px;
        font-size: 12px;
        align-self: flex-end;
    }

    /* WhatsApp form container mobile */
    .whatsapp-form-container {
        flex-direction: column;
        gap: 8px;
    }

    .whatsapp-form-container .form-control {
        width: 100%;
        margin-bottom: 0;
    }

    .whatsapp-form-container .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }

    /* WhatsApp alert mobile */
    .whatsapp-alert {
        padding: 10px 12px;
        font-size: 13px;
        flex-wrap: wrap;
    }

    .whatsapp-alert span {
        word-break: break-word;
        line-height: 1.4;
    }

    .whatsapp-alert-close {
        margin-left: auto;
        margin-top: -2px;
    }

    /* Settings save button mobile */
    .btn-save-settings {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Card padding mobile */
    .card-body {
        padding: 15px;
    }

    /* Form groups mobile */
    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }

    /* Card footer mobile */
    .card-footer {
        padding: 10px 15px;
        text-align: right;
    }

    .card-footer .btn {
        width: auto;
        margin-left: 0;
        margin-top: 0;
        min-width: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
    min-width: auto;
    border-radius: 6px;
}

/* Khusus untuk retry button di error state - FORCE SMALL SIZE */
.error-retry-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    min-height: 24px !important;
    height: 24px !important;
    min-width: auto !important;
    max-width: 80px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    box-shadow: none !important;
    transform: none !important;
    line-height: 1 !important;
}

.error-retry-btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

.error-retry-btn i {
    font-size: 10px !important;
}

/* Alpine.js Cloak */
[x-cloak] {
    display: none !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* FAB (Floating Action Button) */
.fab {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.6);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 24px 0 0 0;
    flex-wrap: nowrap;
    z-index: 10;
    position: relative;
    overflow-x: auto;
    padding: 0 12px;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pagination::-webkit-scrollbar {
    display: none;
}

.pagination button {
    min-width: 42px;
    max-width: 42px;
    min-height: 42px;
    font-size: 16px;
    border-radius: 10px;
    padding: 0;
    font-weight: 600;
    border: none;
    background: #f1f3f4;
    color: #333;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover {
    background: #e9ecef;
}

.pagination button.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination untuk halaman dengan FAB (PPP Secret) - geser ke kiri */
body[data-page="pppsecret"] .pagination {
    margin-right: 70px;
    justify-content: flex-start;
    padding-left: 20px;
    padding-bottom: 100px; /* Space for FAB + bottom nav */
}

/* Pagination untuk halaman tanpa FAB (PPP Active, PPP Inactive) - center */
body[data-page="pppactive"] .pagination,
body[data-page="pppinactive"] .pagination {
    margin-right: 0;
    justify-content: center;
    padding-bottom: 20px; /* Less padding, no FAB */
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 68px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    min-width: 0;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #4CAF50;
}

.nav-item.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    display: block;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Default: show full text, hide short text */
.nav-text-short {
    display: none;
}

.nav-text-full {
    display: block;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Password Toggle Styles */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    flex: 1;
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 16px;
    z-index: 10;
}

.password-toggle:hover {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.password-display {
    background: #f8f9fa;
    padding: 12px 50px 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    position: relative;
    word-break: break-all;
    min-height: 48px;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
}

.password-display.hidden {
    font-family: Arial, sans-serif;
    letter-spacing: 3px;
    font-size: 16px;
    color: #666;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Delete Modal - SweetAlert Style */
.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.delete-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.delete-modal-icon {
    padding: 40px 40px 20px 40px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    position: relative;
}

.delete-modal-icon i {
    font-size: 64px;
    margin-bottom: 10px;
    animation: shake 0.5s ease-in-out;
}

.delete-modal-body {
    padding: 30px 40px;
}

.delete-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.delete-modal-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.delete-modal-secret-name {
    font-weight: 700;
    color: #ff6b6b;
    font-size: 18px;
    margin: 10px 0;
    padding: 10px;
    background: #fff5f5;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.delete-modal-footer {
    padding: 20px 40px 40px 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.delete-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    touch-action: manipulation;
}

.delete-modal-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.delete-modal-btn-cancel:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.delete-modal-btn-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.delete-modal-btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Success Modal - SweetAlert Style */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.success-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.success-modal-icon {
    padding: 40px 40px 20px 40px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    position: relative;
}

.success-modal-icon i {
    font-size: 64px;
    margin-bottom: 10px;
    animation: bounce 0.6s ease-in-out;
}

.success-modal-body {
    padding: 30px 40px;
}

.success-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.success-modal-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.success-modal-secret-name {
    font-weight: 700;
    color: #4CAF50;
    font-size: 18px;
    margin: 10px 0;
    padding: 10px;
    background: #f1f8e9;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.success-modal-footer {
    padding: 20px 40px 40px 40px;
    display: flex;
    justify-content: center;
}

.success-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    touch-action: manipulation;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.success-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

/* Auto-close progress bar */
.success-modal-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 0 0 20px 20px;
    animation: progressBar 3s linear forwards;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* Disconnect Modal - Orange Warning Style */
.disconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.disconnect-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.disconnect-modal-icon {
    padding: 40px 40px 20px 40px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    position: relative;
}

.disconnect-modal-icon i {
    font-size: 64px;
    margin-bottom: 10px;
    animation: shake 0.5s ease-in-out;
}

.disconnect-modal-body {
    padding: 30px 40px;
}

.disconnect-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.disconnect-modal-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.disconnect-modal-user-info {
    margin: 20px 0;
    padding: 15px;
    background: #fff3e0;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

.disconnect-modal-user-name {
    font-weight: 700;
    color: #ff9800;
    font-size: 18px;
    margin-bottom: 5px;
}

.disconnect-modal-user-ip {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.disconnect-modal-user-uptime {
    font-size: 12px;
    color: #999;
}

.disconnect-modal-footer {
    padding: 20px 40px 40px 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.disconnect-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    touch-action: manipulation;
}

.disconnect-modal-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.disconnect-modal-btn-cancel:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.disconnect-modal-btn-disconnect {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.disconnect-modal-btn-disconnect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

/* Disconnect Success Modal - Orange Success Style */
.disconnect-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.disconnect-success-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.disconnect-success-modal-icon {
    padding: 40px 40px 20px 40px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    position: relative;
}

.disconnect-success-modal-icon i {
    font-size: 64px;
    margin-bottom: 10px;
    animation: bounce 0.6s ease-in-out;
}

.disconnect-success-modal-body {
    padding: 30px 40px;
}

.disconnect-success-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.disconnect-success-modal-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.disconnect-success-modal-user-name {
    font-weight: 700;
    color: #ff9800;
    font-size: 18px;
    margin: 10px 0;
    padding: 10px;
    background: #fff3e0;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

.disconnect-success-modal-footer {
    padding: 20px 40px 40px 40px;
    display: flex;
    justify-content: center;
}

.disconnect-success-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    touch-action: manipulation;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.disconnect-success-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

/* Auto-close progress bar for disconnect success */
.disconnect-success-modal-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-radius: 0 0 20px 20px;
    animation: progressBar 3s linear forwards;
}

/* Performance optimizations */
.card, .btn, .nav-item, .modal-content {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Improve touch targets */
.btn, .nav-item, button, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus styles for accessibility */
.btn:focus, .form-control:focus, .nav-item:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .card {
        border: 1px solid #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hide page numbers on very small screens, show only prev/next */
@media (max-width: 360px) {
    .pagination button:not(:first-child):not(:last-child) {
        display: none;
    }

    .pagination button:nth-child(2),
    .pagination button:nth-last-child(2) {
        display: flex;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
        padding-bottom: 0;
    }

    .header {
        width: 100vw;
        max-width: 100vw;
        left: 0;
        transform: none;
        padding: max(env(safe-area-inset-top), 15px) 15px 15px 15px;
    }

    .main-content {
        padding: 15px;
        padding-top: calc(190px + max(env(safe-area-inset-top), 5vw));
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
        scroll-padding-top: calc(190px + max(env(safe-area-inset-top), 5vw));
    }

    .modal-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .resource-card {
        padding: 8px;
    }

    .resource-card i {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .resource-value {
        font-size: 12px;
    }

    .resource-label {
        font-size: 9px;
    }

    .pagination {
        gap: 6px;
        margin: 18px 0 0 0;
        padding: 0 8px;
    }

    .pagination button {
        min-width: 38px;
        min-height: 38px;
        font-size: 14px;
        border-radius: 8px;
        padding: 0;
    }

    /* PPP Secret pagination di mobile */
    body[data-page="pppsecret"] .pagination {
        margin-right: 60px;
        padding-left: 15px;
        padding-bottom: 100px;
    }

    /* PPP Active/Inactive pagination di mobile */
    body[data-page="pppactive"] .pagination,
    body[data-page="pppinactive"] .pagination {
        margin-right: 0;
        justify-content: center;
        padding-bottom: 20px;
    }

    /* Bottom navigation responsive untuk mobile */
    .nav-item {
        padding: 8px 4px;
        min-height: 62px;
    }

    .nav-item i {
        font-size: 18px;
        margin-bottom: 3px;
    }

    .nav-item span {
        font-size: 11px;
        line-height: 1.1;
    }

    /* Show short text on mobile */
    .nav-text-short {
        display: block;
    }

    .nav-text-full {
        display: none;
    }

    /* Margin ekstra untuk card pertama di mobile */
    .content-section .card:first-of-type {
        margin-top: 8px;
    }

    .list-item {
        padding: 10px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 32px;
    }

    /* Delete modal responsive */
    .delete-modal-content {
        width: 95%;
        margin: 20px;
    }

    .delete-modal-icon {
        padding: 30px 30px 15px 30px;
    }

    .delete-modal-icon i {
        font-size: 48px;
    }

    .delete-modal-body {
        padding: 20px 30px;
    }

    .delete-modal-title {
        font-size: 20px;
    }

    .delete-modal-text {
        font-size: 14px;
    }

    .delete-modal-footer {
        padding: 15px 30px 30px 30px;
        flex-direction: column;
        gap: 10px;
    }

    .delete-modal-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100%;
    }

    /* Success modal responsive */
    .success-modal-content {
        width: 95%;
        margin: 20px;
    }

    .success-modal-icon {
        padding: 30px 30px 15px 30px;
    }

    .success-modal-icon i {
        font-size: 48px;
    }

    .success-modal-body {
        padding: 20px 30px;
    }

    .success-modal-title {
        font-size: 20px;
    }

    .success-modal-text {
        font-size: 14px;
    }

    .success-modal-footer {
        padding: 15px 30px 30px 30px;
    }

    .success-modal-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100%;
    }

    /* Disconnect modal responsive */
    .disconnect-modal-content {
        width: 95%;
        margin: 20px;
    }

    .disconnect-modal-icon {
        padding: 30px 30px 15px 30px;
    }

    .disconnect-modal-icon i {
        font-size: 48px;
    }

    .disconnect-modal-body {
        padding: 20px 30px;
    }

    .disconnect-modal-title {
        font-size: 20px;
    }

    .disconnect-modal-text {
        font-size: 14px;
    }

    .disconnect-modal-user-info {
        margin: 15px 0;
        padding: 12px;
    }

    .disconnect-modal-user-name {
        font-size: 16px;
    }

    .disconnect-modal-footer {
        padding: 15px 30px 30px 30px;
        flex-direction: column;
        gap: 10px;
    }

    .disconnect-modal-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100%;
    }

    /* Disconnect success modal responsive */
    .disconnect-success-modal-content {
        width: 95%;
        margin: 20px;
    }

    .disconnect-success-modal-icon {
        padding: 30px 30px 15px 30px;
    }

    .disconnect-success-modal-icon i {
        font-size: 48px;
    }

    .disconnect-success-modal-body {
        padding: 20px 30px;
    }

    .disconnect-success-modal-title {
        font-size: 20px;
    }

    .disconnect-success-modal-text {
        font-size: 14px;
    }

    .disconnect-success-modal-footer {
        padding: 15px 30px 30px 30px;
    }

    .disconnect-success-modal-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100%;
    }

    /* Password field responsive */
    .password-toggle {
        right: 8px;
        font-size: 14px;
        padding: 2px;
    }

    .password-display {
        padding: 10px 40px 10px 12px;
        font-size: 13px;
        min-height: 44px;
    }

    .password-display.hidden {
        font-size: 14px;
        letter-spacing: 2px;
    }

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

/* Small screens (≤400px) */
@media (max-width: 400px) {
    .pagination {
        gap: 5px;
        margin: 16px 0 0 0;
        padding: 0 6px;
    }

    .pagination button {
        min-width: 34px;
        min-height: 34px;
        font-size: 13px;
        padding: 0;
    }

    /* PPP Secret pagination di layar sangat kecil */
    body[data-page="pppsecret"] .pagination {
        margin-right: 50px;
        padding-left: 10px;
        padding-bottom: 100px;
    }

    /* PPP Active/Inactive pagination di layar sangat kecil */
    body[data-page="pppactive"] .pagination,
    body[data-page="pppinactive"] .pagination {
        margin-right: 0;
        justify-content: center;
        padding-bottom: 20px;
    }

    .header {
        padding: max(env(safe-area-inset-top), 12px) 12px 12px 12px;
    }

    .main-content {
        padding: 12px;
        padding-top: calc(185px + max(env(safe-area-inset-top), 5vw));
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }

    .resource-grid {
        gap: 6px;
    }

    .resource-card {
        padding: 6px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Keep error retry button EXTRA small on mobile */
    .error-retry-btn {
        padding: 3px 6px !important;
        font-size: 10px !important;
        min-height: 20px !important;
        height: 20px !important;
        max-width: 60px !important;
        gap: 2px !important;
    }

    .error-retry-btn i {
        font-size: 9px !important;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 16px; /* Keep 16px to prevent zoom on iOS */
    }

    /* Bottom navigation untuk layar sangat kecil */
    .nav-item {
        padding: 6px 2px;
        min-height: 56px;
    }

    .nav-item i {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .nav-item span {
        font-size: 10px;
        line-height: 1;
    }

    /* Keep short text for very small screens */
    .nav-text-short {
        display: block;
    }

    .nav-text-full {
        display: none;
    }

    /* Margin ekstra untuk card pertama di layar sangat kecil */
    .content-section .card:first-of-type {
        margin-top: 10px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .header {
        padding: max(env(safe-area-inset-top), 10px) 20px 10px 20px;
    }

    .resource-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .resource-card {
        padding: 6px;
    }

    .resource-card i {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .resource-value {
        font-size: 11px;
    }

    .resource-label {
        font-size: 8px;
    }

    /* Bottom navigation untuk landscape */
    .nav-item {
        padding: 5px 2px;
        min-height: 52px;
    }

    .nav-item i {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .nav-item span {
        font-size: 9px;
        line-height: 1;
    }

    /* Keep short text for landscape */
    .nav-text-short {
        display: block;
    }

    .nav-text-full {
        display: none;
    }
}

/* Extra small screens (width < 320px) */
@media (max-width: 320px) {
    .nav-item {
        padding: 5px 1px;
        min-height: 54px;
    }

    .nav-item i {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .nav-item span {
        font-size: 9px;
        line-height: 1;
    }

    /* Use short text for very small screens */
    .nav-text-short {
        display: block;
    }

    .nav-text-full {
        display: none;
    }
}

/* Additional mobile optimizations */
@supports (-webkit-touch-callout: none) {
    /* iOS specific styles */
    .container {
        min-height: -webkit-fill-available;
    }
}

/* Prevent zoom on input focus for iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select, textarea, input[type="text"], input[type="password"],
    input[type="datetime"], input[type="datetime-local"],
    input[type="date"], input[type="month"], input[type="time"],
    input[type="week"], input[type="number"], input[type="email"],
    input[type="url"], input[type="search"], input[type="tel"] {
        font-size: 16px !important;
    }
}

/* Premium Action Buttons - Glassmorphism Style */
.btn-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 36px;
    height: 36px;
    gap: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: inherit;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-action:hover::before {
    opacity: 1;
}

.btn-action:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-action:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.btn-action i {
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.btn-action .btn-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* View Button - Premium Blue */
.btn-action-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-action-view:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Edit Button - Premium Orange */
.btn-action-edit {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.btn-action-edit:hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
    color: white;
}

/* Delete Button - Premium Red */
.btn-action-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-action-delete:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    color: white;
}

/* Remote Button - Premium Green */
.btn-action-remote {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-action-remote:hover {
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
    color: white;
}

/* Disconnect Button - Premium Red */
.btn-action-disconnect {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-action-disconnect:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    color: white;
}

/* Premium hover effects */
.btn-action-view:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-action-edit:hover {
    background: linear-gradient(135deg, #ed64a6 0%, #f56565 100%);
}

.btn-action-remote:hover {
    background: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
}

.btn-action-delete:hover,
.btn-action-disconnect:hover {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

/* Responsive behavior */
@media (min-width: 768px) {
    .btn-action {
        padding: 8px 16px;
        min-width: 80px;
        height: 38px;
        gap: 8px;
        border-radius: 14px;
    }

    .btn-action .btn-text {
        display: inline;
    }

    .btn-action i {
        font-size: 14px;
    }
}

/* Mobile - Icon only */
@media (max-width: 767px) {
    .btn-action .btn-text {
        display: none;
    }

    .btn-action {
        min-width: 36px;
        padding: 8px;
        border-radius: 12px;
    }
}

/* Remote Access Links */
.remote-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* Remote Access Control */
.remote-access-control {
    margin-top: 8px;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #4CAF50;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.loading-spinner {
    display: flex;
    align-items: center;
    color: #4CAF50;
}

.loading-spinner i {
    font-size: 16px;
}

.remote-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    gap: 12px;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.remote-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(68, 160, 141, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.remote-link:hover::before {
    opacity: 1;
}

.remote-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #4ecdc4;
    color: #2d3748;
    text-decoration: none;
}

.remote-link-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.remote-link i {
    font-size: 18px;
    color: #4ecdc4;
    min-width: 24px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.remote-link span:first-of-type {
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.remote-url {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #6c757d;
    margin-left: auto;
    background: rgba(108, 117, 125, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    flex-shrink: 0;
}

.remote-link:hover .remote-url {
    background: rgba(78, 205, 196, 0.2);
    color: #2d3748;
}

/* Mobile responsive for remote links */
@media (max-width: 480px) {
    .remote-link {
        padding: 12px;
        gap: 8px;
        min-height: 50px;
    }

    .remote-link-content {
        gap: 8px;
    }

    .remote-link i {
        font-size: 16px;
        min-width: 20px;
    }

    .remote-link span:first-of-type {
        font-size: 13px;
    }

    .remote-url {
        font-size: 10px;
        max-width: 150px;
        padding: 2px 6px;
    }
}
