* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #004e89;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #1a1a2e;
    --light-color: #f5f5f5;
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-color);
    color: #333;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 10px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #666;
}

/* Header */
.header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: var(--primary-color);
    font-size: 24px;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Container */
.container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: white;
    padding: 20px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: var(--primary-color);
}

.nav-item i {
    width: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

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

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: var(--primary-color);
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--success-color);
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--warning-color);
}

.stat-card:nth-child(4) .stat-icon {
    background: var(--info-color);
}

.stat-info h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
}

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

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: #333;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

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

.data-table thead {
    background: var(--dark-color);
    color: white;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

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

.page-header h1 {
    color: var(--dark-color);
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Recent Activity */
.recent-activity {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-activity h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

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

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

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Badge */
.badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

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

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

/* Buttons Section */
.buttons-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.buttons-list {
    margin-top: 20px;
}

.button-item {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.button-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.button-actions {
    display: flex;
    gap: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Info Box */
.info-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.info-box code {
    display: block;
    background: #1a1a2e;
    color: #00ff00;
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
    overflow-x: auto;
}

/* Image Preview */
.current-image {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.current-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Text Colors */
.text-success {
    color: var(--success-color);
}

.text-muted {
    color: #999;
}

/* Telegram Formatting Guide */
.telegram-formatting-guide {
    background: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 5px;
}

.telegram-formatting-guide h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.formatting-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.formatting-examples p {
    margin: 5px 0;
    font-size: 14px;
}

.formatting-examples code {
    background: #1a1a2e;
    color: #00ff00;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Editor Tabs */
.editor-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.editor-tab {
    padding: 8px 16px;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s;
}

.editor-tab:hover {
    background: #d0d0d0;
}

.editor-tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

