/**
 * Contabo Cloud Server - Admin Styles
 * Styling for admin panel and client area
 */

/* ====================================
   GENERAL STYLES
   ==================================== */
.contabo-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #333;
}

.contabo-wrapper * {
    box-sizing: border-box;
}

/* ====================================
   LOADER
   ==================================== */
.contabo-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.contabo-loader .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   ALERTS
   ==================================== */
.contabo-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: none;
}

.contabo-alert.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.contabo-alert.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.contabo-alert.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.contabo-alert.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* ====================================
   BUTTONS
   ==================================== */
.btn-contabo {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
}

.btn-contabo:hover {
    opacity: 0.85;
    text-decoration: none;
}

.btn-contabo:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-contabo-primary {
    color: #fff;
    background-color: #0066cc;
    border-color: #0066cc;
}

.btn-contabo-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
}

.btn-contabo-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-contabo-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-contabo-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-contabo-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-contabo-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-contabo-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-contabo-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-contabo-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-contabo-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-contabo-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-contabo-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-contabo-lg {
    padding: 12px 24px;
    font-size: 18px;
}

.btn-contabo-block {
    display: block;
    width: 100%;
}

/* ====================================
   CARDS
   ==================================== */
.contabo-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.contabo-card-header {
    background: linear-gradient(135deg, #0066cc, #004c99);
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
}

.contabo-card-body {
    padding: 20px;
}

.contabo-card-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

/* ====================================
   TABS
   ==================================== */
.contabo-tabs {
    margin-bottom: 20px;
}

.contabo-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #e9ecef;
}

.contabo-tabs-nav li {
    margin: 0;
}

.contabo-tabs-nav a {
    display: block;
    padding: 12px 20px;
    color: #6c757d;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.contabo-tabs-nav a:hover {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

.contabo-tabs-nav a.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    font-weight: 600;
}

.contabo-tab-content {
    display: none;
    padding: 20px 0;
}

.contabo-tab-content.active {
    display: block;
}

/* ====================================
   FORMS
   ==================================== */
.contabo-form-group {
    margin-bottom: 20px;
}

.contabo-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.contabo-form-group .help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.contabo-form-control {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.contabo-form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}

.contabo-form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.contabo-form-control-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.contabo-form-control-lg {
    padding: 14px 16px;
    font-size: 16px;
}

select.contabo-form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 8px 10px;
    padding-right: 32px;
}

textarea.contabo-form-control {
    min-height: 100px;
    resize: vertical;
}

/* ====================================
   TABLES
   ==================================== */
.contabo-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.contabo-table th,
.contabo-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.contabo-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.contabo-table tbody tr:hover {
    background-color: #f8f9fa;
}

.contabo-table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.contabo-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ====================================
   SERVER INFO
   ==================================== */
.server-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.server-info-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.server-info-item .icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0066cc;
    color: #fff;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
}

.server-info-item .details {
    flex-grow: 1;
}

.server-info-item .label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.server-info-item .value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

/* ====================================
   STATUS BADGES
   ==================================== */
.contabo-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.contabo-badge-success {
    color: #fff;
    background-color: #28a745;
}

.contabo-badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.contabo-badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.contabo-badge-info {
    color: #fff;
    background-color: #17a2b8;
}

.contabo-badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

/* ====================================
   ACTION BUTTONS GROUP
   ==================================== */
.contabo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.contabo-actions .btn-contabo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ====================================
   SNAPSHOT TABLE
   ==================================== */
.snapshot-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.snapshot-table th,
.snapshot-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.snapshot-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.snapshot-table tbody tr:hover {
    background: #f8f9fa;
}

/* ====================================
   ADMIN PANEL STYLES
   ==================================== */
.contabo-admin-header {
    background: linear-gradient(135deg, #0066cc, #004c99);
    color: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
}

.contabo-admin-header h1 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.contabo-admin-header p {
    margin: 0;
    opacity: 0.85;
}

.contabo-admin-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.contabo-admin-section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 15px;
}

.contabo-admin-section-body {
    padding: 20px;
}

/* ====================================
   GRID SYSTEM
   ==================================== */
.contabo-row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.contabo-col {
    flex: 1;
    padding: 10px;
    min-width: 0;
}

.contabo-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 10px;
}

.contabo-col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 10px;
}

.contabo-col-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 10px;
}

.contabo-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 10px;
}

/* ====================================
   UTILITIES
   ==================================== */
.contabo-text-center {
    text-align: center;
}

.contabo-text-right {
    text-align: right;
}

.contabo-text-muted {
    color: #6c757d;
}

.contabo-text-success {
    color: #28a745;
}

.contabo-text-danger {
    color: #dc3545;
}

.contabo-text-warning {
    color: #856404;
}

.contabo-mt-1 { margin-top: 5px; }
.contabo-mt-2 { margin-top: 10px; }
.contabo-mt-3 { margin-top: 15px; }
.contabo-mt-4 { margin-top: 20px; }
.contabo-mt-5 { margin-top: 30px; }

.contabo-mb-1 { margin-bottom: 5px; }
.contabo-mb-2 { margin-bottom: 10px; }
.contabo-mb-3 { margin-bottom: 15px; }
.contabo-mb-4 { margin-bottom: 20px; }
.contabo-mb-5 { margin-bottom: 30px; }

.contabo-p-0 { padding: 0; }
.contabo-p-1 { padding: 5px; }
.contabo-p-2 { padding: 10px; }
.contabo-p-3 { padding: 15px; }
.contabo-p-4 { padding: 20px; }
.contabo-p-5 { padding: 30px; }

.contabo-d-none { display: none; }
.contabo-d-block { display: block; }
.contabo-d-flex { display: flex; }
.contabo-d-inline-flex { display: inline-flex; }

.contabo-justify-center { justify-content: center; }
.contabo-justify-between { justify-content: space-between; }
.contabo-align-center { align-items: center; }

.contabo-w-100 { width: 100%; }
.contabo-h-100 { height: 100%; }

/* ====================================
   MODAL STYLES
   ==================================== */
.contabo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.contabo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.contabo-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contabo-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.contabo-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.contabo-modal-body {
    padding: 20px;
}

.contabo-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.contabo-modal-footer .btn-contabo {
    margin-left: 10px;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
    .server-info-grid {
        grid-template-columns: 1fr;
    }
    
    .contabo-col-6,
    .contabo-col-4,
    .contabo-col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .contabo-tabs-nav {
        flex-direction: column;
    }
    
    .contabo-tabs-nav a {
        border-bottom: none;
        border-left: 2px solid transparent;
    }
    
    .contabo-tabs-nav a.active {
        border-bottom: none;
        border-left-color: #0066cc;
    }
    
    .contabo-actions {
        flex-direction: column;
    }
    
    .contabo-actions .btn-contabo {
        width: 100%;
        justify-content: center;
    }
}

/* ====================================
   COPY TO CLIPBOARD
   ==================================== */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 2px 8px;
    margin-left: 5px;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #e9ecef;
    color: #333;
}

.copy-btn.copied {
    color: #28a745;
}

/* ====================================
   CONSOLE OUTPUT
   ==================================== */
.contabo-console {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.contabo-console .line {
    margin: 0;
    padding: 2px 0;
}

.contabo-console .line-number {
    color: #858585;
    display: inline-block;
    width: 30px;
    text-align: right;
    margin-right: 10px;
    user-select: none;
}
