* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Panel Container */
.panel-container {
    min-height: 100vh;
    background: #f5f5f5;
}

.panel-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h1 {
    color: #667eea;
    font-size: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions span {
    color: #666;
    font-weight: 500;
}

.panel-nav {
    background: white;
    padding: 0 30px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 15px 25px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-btn:hover {
    color: #667eea;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.panel-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    color: #333;
    font-size: 28px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-card p {
    color: #667eea;
    font-size: 32px;
    font-weight: bold;
}

/* Table */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #667eea;
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table .loading {
    text-align: center;
    color: #999;
    padding: 40px;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.expired {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.suspended {
    background: #fff3cd;
    color: #856404;
}

.status-badge.revoked {
    background: #f5c6cb;
    color: #721c24;
}

.status-badge.valid {
    background: #d4edda;
    color: #155724;
}

.status-badge.invalid {
    background: #f8d7da;
    color: #721c24;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    color: #333;
    font-size: 24px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

/* License Details */
.license-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.detail-item label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.detail-item value {
    display: block;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.machines-list {
    margin-top: 20px;
}

.machines-list h3 {
    margin-bottom: 15px;
    color: #333;
}

.machine-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.machine-info {
    flex: 1;
}

.machine-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.machine-info small {
    color: #666;
    font-size: 12px;
}

/* API Documentation */
.api-documentation {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

.api-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.api-section:last-child {
    border-bottom: none;
}

.api-section h3 {
    color: #667eea;
    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.api-section ol,
.api-section ul {
    color: #666;
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 15px;
}

.api-section li {
    margin-bottom: 8px;
}

.code-block {
    background: #1e1e1e;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    margin: 0;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-block code {
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.api-section code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #e74c3c;
    font-size: 14px;
}

.api-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.api-warning strong {
    color: #856404;
    display: block;
    margin-bottom: 10px;
}

.api-warning ul {
    margin: 10px 0 0 20px;
    color: #856404;
}

.file-list {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
}

.file-item {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.file-item:last-child {
    border-bottom: none;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.endpoint-method {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
}

.endpoint-url {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.troubleshooting {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
}

.trouble-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.trouble-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.trouble-item strong {
    color: #e74c3c;
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

.trouble-item ul {
    margin: 10px 0 0 20px;
    color: #666;
}

.checklist {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    margin: 15px 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.check-item:last-child {
    border-bottom: none;
}

.check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: not-allowed;
}

.check-item label {
    color: #333;
    cursor: default;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.3s;
    z-index: 10;
}

.copy-btn:hover {
    background: #5568d3;
}

.copy-btn:active {
    background: #4456b8;
}

.code-block {
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .panel-header {
        flex-direction: column;
        gap: 15px;
    }

    .panel-nav {
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .license-details {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: scroll;
    }

    .api-documentation {
        padding: 20px;
    }

    .code-block {
        padding: 15px;
        font-size: 12px;
    }

    .api-section h3 {
        font-size: 20px;
    }
}

