/* Component-specific styles */

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    margin-top: 70px;
}

.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.86);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
    backdrop-filter: blur(18px);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}


.sidebar-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-icon {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background-color: var(--bg-light);
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.84);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(14px);
}

.card-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(245,247,255,0.96) 100%);
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 14px;
    font-size: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.12);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, 0.10);
}

.table th {
    font-weight: 700;
    background-color: rgba(244, 247, 255, 0.9);
    color: var(--text-dark);
}

.table-striped tbody tr:nth-child(odd) {
    background-color: var(--bg-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

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

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

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

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

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

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.52);
    z-index: 1050;
}

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

.modal-dialog {
    background: rgba(255,255,255,0.92);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(18px);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Calendar Component */
.calendar {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


.calendar-day.today {
    background-color: var(--primary-color);
    color: white;
}

.calendar-day.has-posts {
    background-color: var(--accent-color);
    color: white;
}

/* Social Media Icons */
.social-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    margin-right: 0.5rem;
}

.social-icon.facebook {
    background-color: #1877f2;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-icon.twitter {
    background-color: #1da1f2;
}

.social-icon.linkedin {
    background-color: #0077b5;
}

.social-icon.youtube {
    background-color: #ff0000;
}

.social-icon.telegram {
    background-color: #0088cc;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments for components */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .modal-dialog {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .calendar-grid {
        font-size: 0.875rem;
    }
}
