/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Login Page */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-login__container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.admin-login__title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

/* Layout */
.admin-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #2c3e50;
    color: white;
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header__title {
    font-size: 16px;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav__link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.admin-nav__link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-nav__logout {
    margin: 0;
}

.admin-main {
    flex: 1;
    padding: 15px 0;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-page-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-stat-card__value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.admin-stat-card__label {
    color: #666;
    font-size: 14px;
}

/* Section */
.admin-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.admin-section__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.admin-table thead {
    background: #f8f9fa;
}

.admin-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

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

/* Forms */
.admin-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-form__group {
    margin-bottom: 20px;
}

.admin-form__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.admin-form__label--small {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
}

.admin-form__input,
.admin-form__textarea,
.admin-form__select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.admin-form__input:focus,
.admin-form__textarea:focus,
.admin-form__select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-form__input--error {
    border-color: #e74c3c;
}

.admin-form__input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.admin-form__textarea {
    resize: vertical;
    min-height: 100px;
}

.admin-form__error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.admin-form__help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.admin-form__icon-preview {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.admin-form__icon-preview img {
    display: block;
}

.admin-form__actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Buttons */
.admin-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.admin-btn--primary {
    background: #667eea;
    color: white;
}

.admin-btn--primary:hover {
    background: #5568d3;
}

.admin-btn--secondary {
    background: #6c757d;
    color: white;
}

.admin-btn--secondary:hover {
    background: #5a6268;
}

.admin-btn--danger {
    background: #e74c3c;
    color: white;
}

.admin-btn--danger:hover {
    background: #c0392b;
}

.admin-btn--small {
    padding: 6px 12px;
    font-size: 12px;
}

.admin-btn--link {
    background: none;
    color: white;
    padding: 0;
    text-decoration: underline;
}

.admin-btn--link:hover {
    background: none;
    text-decoration: none;
}

/* Alerts */
.admin-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

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

.admin-alert ul {
    margin: 0;
    padding-left: 20px;
}

/* Dashboard */
.admin-dashboard {
    padding: 0;
}

.admin-dashboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
}

.admin-dashboard__header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-dashboard__title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.admin-dashboard__stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.admin-dashboard__count {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.admin-dashboard__label {
    font-size: 14px;
    color: #666;
}

.admin-dashboard__table-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.admin-table--dashboard {
    margin: 0;
}

.admin-table--dashboard thead {
    background: #f8f9fa;
}

.admin-table--dashboard th {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.admin-table--dashboard td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.admin-table--dashboard tbody tr {
    transition: background-color 0.15s;
}

.admin-table--dashboard tbody tr:hover {
    background-color: #f8f9fa;
}

.admin-table--dashboard tbody tr:last-child td {
    border-bottom: none;
}

.admin-dashboard__empty {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #666;
}

.admin-table__country {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table__flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.admin-table__country-name {
    color: #666;
}

.admin-table__stations-count {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.admin-table__sort-link {
    color: #2c3e50;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.2s;
}

.admin-table__sort-link:hover {
    color: #667eea;
    text-decoration: none;
}

.admin-table__sort-arrow {
    font-size: 12px;
    color: #667eea;
}

.admin-table__stores {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table__store-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.admin-table__store-link:hover {
    opacity: 0.7;
}

.admin-table__store-link img {
    display: block;
    width: 24px;
    height: 24px;
}

.admin-table__stores-empty {
    color: #999;
}

.admin-table__domain-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s;
}

.admin-table__domain-link:hover {
    color: #667eea;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header__container {
        flex-direction: column;
        gap: 10px;
    }

    .admin-header {
        padding: 10px 0;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

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

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }

    .admin-dashboard__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

