/**
 * Modern Admin Portal Styles
 * Consistent design system for admin pages
 */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Container */
.modern-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Sections */
.modern-header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2rem;
}

.modern-header p {
    color: #666;
    margin-top: 10px;
}

/* Buttons */
.modern-btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.modern-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.modern-btn-success {
    background: #28a745;
}

.modern-btn-success:hover {
    background: #218838;
}

.modern-btn-danger {
    background: #dc3545;
}

.modern-btn-danger:hover {
    background: #c82333;
}

.modern-btn-secondary {
    background: #6c757d;
}

.modern-btn-secondary:hover {
    background: #545b62;
}

.modern-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0 2px;
}

/* Cards & Sections */
.modern-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.modern-section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
}

.modern-section-body {
    padding: 20px;
}

/* Tables */
.modern-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-collapse: collapse;
}

.modern-table th,
.modern-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.modern-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.modern-table th a {
    color: #495057;
    text-decoration: none;
    display: block;
}

.modern-table th a:hover {
    color: #007bff;
}

.modern-table tbody tr:hover {
    background: #f8f9fa;
}

/* Badges */
.modern-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.modern-badge-success {
    background: #d4edda;
    color: #155724;
}

.modern-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.modern-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.modern-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.modern-badge-primary {
    background: #e3f2fd;
    color: #1976d2;
}

/* Alerts */
.modern-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.modern-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.modern-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.modern-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.modern-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Search Box */
.modern-search {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-search input[type="text"],
.modern-search input[type="search"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    max-width: 400px;
}

.modern-search input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Pagination */
.modern-pagination {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-pagination a,
.modern-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
    transition: all 0.2s;
}

.modern-pagination span {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.modern-pagination a:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

/* Form Elements */
.modern-form-group {
    margin-bottom: 20px;
}

.modern-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.modern-form-group input,
.modern-form-group select,
.modern-form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modern-form-group input:focus,
.modern-form-group select:focus,
.modern-form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Stats/Count */
.modern-count {
    font-weight: bold;
    color: #28a745;
}

.modern-count:hover {
    color: #1e7e34;
}

/* Icon Support */
.modern-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-container {
        padding: 10px;
    }

    .modern-header {
        padding: 20px;
    }

    .modern-table {
        font-size: 14px;
    }

    .modern-table th,
    .modern-table td {
        padding: 10px;
    }
}
