* {
    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;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.card h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.form-section {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(81, 207, 102, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #868e96 0%, #6c757d 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(134, 142, 150, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #339af0 0%, #228be6 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(51, 154, 240, 0.4);
}

.actions-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.quick-actions input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

table tr:hover {
    background-color: #f8f9fa;
}

.status-active {
    color: #51cf66;
    font-weight: 600;
}

.status-cut {
    color: #ff6b6b;
    font-weight: 600;
}

.status-info {
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-item .label {
    font-weight: 600;
    color: #333;
}

.status-item .value {
    color: #666;
}

.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: 500;
}

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

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

.alert-info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* Responsive design */
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-section label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: #333;
}

.filter-section select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

.mikrotiks-list {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.status-connected {
    color: #51cf66;
    font-weight: 600;
}

.status-disconnected {
    color: #ff6b6b;
    font-weight: 600;
}

.status-testing {
    color: #339af0;
    font-weight: 600;
}

.quick-actions select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-right: 10px;
}

.bulk-actions-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 30px;
}

.bulk-method-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.bulk-method-selector label {
    display: inline-block;
    margin-right: 20px;
    font-weight: 600;
    cursor: pointer;
}

.bulk-method-selector input[type="radio"] {
    margin-right: 8px;
}

.bulk-method {
    margin-bottom: 20px;
}

.bulk-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.csv-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.csv-preview h4 {
    margin-bottom: 15px;
    color: #333;
}

.progress-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progressText {
    text-align: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

#progressDetails {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.status-success {
    color: #51cf66;
    font-weight: 600;
}

.status-error {
    color: #ff6b6b;
    font-weight: 600;
}

.status-pending {
    color: #339af0;
    font-weight: 600;
}

.csv-preview table {
    font-size: 12px;
}

.csv-preview table th,
.csv-preview table td {
    padding: 8px;
    text-align: left;
}

.csv-preview table th {
    background: #667eea;
    color: white;
}

.csv-preview table tr:nth-child(even) {
    background: #f8f9fa;
}

.bulk-clients-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 30px;
}

.bulk-clients-section h3 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #51cf66;
    padding-bottom: 10px;
}

@media (max-width: 768px) {
    .bulk-method-selector label {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .bulk-actions {
        flex-direction: column;
    }
    
    .bulk-actions button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .csv-preview table {
        font-size: 10px;
    }
    
    .csv-preview table th,
    .csv-preview table td {
        padding: 4px;
    }
}

