@import url('root/light_root.css');

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

body {
    direction: rtl;
    font-family: 'vazir', sans-serif;
    background-color: var(--primary-color);
    min-height: 100vh;
    color: var(--text-color);
    overflow-x: hidden;
}

button, input, a, select {
    font-family: "vazir", sans-serif;
    text-decoration: none;
    outline: none;
}

.btn-confirm {
    background: #ff5f5f;
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: 0.3s ease;
}

.btn-confirm:hover {
    background: #e04e4e;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s ease;
}

.btn-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
}

.messages-container {
    margin-bottom: 25px;
}

.alert-success, .alert-error {
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

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

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

h1.main-title {
    text-align: center;
    margin-top: 40px;
    color: var(--third-color);
}

.login-card {
    background-color: var(--secondary-color);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 450px;
    margin: 30px auto;
    text-align: center;
}

.card-title {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--third-color);
    display: inline-block;
    padding-bottom: 8px;
}

.input-group {
    margin-bottom: 20px;
    text-align: right;
}

.input-group label {
    display: block;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--third-color);
    border-radius: 8px;
    background-color: var(--white-color);
    color: var(--black-color);
}

.span-error {
    display: block;
    color: #ff5f5f;
    font-size: 0.85rem;
    margin-top: -12px;
    margin-bottom: 15px;
    text-align: right;
}

.login-button {
    width: 100%;
    padding: 14px;
    background-color: var(--third-color);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
}

.login-button:hover {
    opacity: 0.9;
}

.extra-text {
    margin-top: 20px;
    color: var(--white-color);
    font-size: 0.9rem;
}

.extra-text a {
    color: var(--third-color);
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 260px;
    background-color: var(--secondary-color);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar.closed {
    transform: translateX(260px);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--third-color);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    padding: 0 15px;
    flex-grow: 1;
}

.nav-links a {
    color: var(--text-color);
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--third-color);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.profile-icon-box {
    font-size: 32px;
    color: var(--third-color);
    display: flex;
    align-items: center;
}

.user-name {
    font-size: 0.95rem;
    color: var(--text-color);
    white-space: nowrap;
    font-weight: 500;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #ff5f5f;
    color: #ff5f5f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #ff5f5f;
    color: white;
}

.dashboard-main {
    flex: 1;
    margin-right: 260px;
    padding: 30px;
    transition: margin-right 0.4s ease;
}

.dashboard-main.wide {
    margin-right: 0;
}

.dashboard-top-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.toggle-btn {
    background: var(--secondary-color);
    border: 1px solid var(--third-color);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toggle-btn span {
    width: 22px;
    height: 2px;
    background: var(--third-color);
    display: block;
}

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

.section-subtitle {
    margin-bottom: 25px;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1rem;
    text-align: center;
}

.announcement-card {
    background: var(--secondary-color);
    padding: 25px;
    padding-bottom: 40px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-right: 4px solid var(--third-color);
    text-align: right;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.announcement-card h4 {
    font-size: 1.2rem;
    color: var(--third-color);
    margin-bottom: 10px;
}

.announcement-card p {
    font-size: 1rem;
    line-height: 1.8;
}

.announcement-date {
    position: absolute;
    bottom: 15px;
    left: 20px;
    font-size: 0.8rem;
    opacity: 0.5;
    color: var(--text-color);
}

.room-details-container {
    max-width: 850px;
    margin: 0 auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.detail-card.accent {
    border: 1px solid var(--third-color);
}

.detail-card .label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

.detail-card .value {
    font-size: 1.1rem;
    font-weight: bold;
}

.roommates-section {
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.capacity-tag {
    background: var(--third-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
}

.roommates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roommate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.roommate-item:last-child {
    border-bottom: none;
}

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

.small-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.action-container {
    margin-top: 30px;
    text-align: center;
    padding-bottom: 20px;
}

.btn-disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    color: #666;
}

.btn-action-lg {
    text-decoration: none;
    display: inline-block;
    padding: 12px 40px;
    font-size: 1.1rem;
    background-color: var(--third-color);
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-action-lg:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.empty-msg {
    padding: 30px;
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
}

.no-room-wrapper {
    text-align: center;
    padding: 60px 20px;
    border-radius: 12px;
    background: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.alert-large-icon {
    font-size: 4.5rem;
    color: #ccc;
    margin-bottom: 25px;
    display: block;
}

.btn-back-link {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
}

.filter-section {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    max-width: 950px;
    margin-right: auto;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-grow: 1;
}

.filter-group select {
    background: var(--primary-color);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 8px;
    flex: 1;
}

.filter-submit-btn {
    background: var(--third-color);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.rooms-list-horizontal {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.room-row-card {
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.room-row-card:hover {
    border-color: var(--third-color);
    transform: translateY(-2px);
}

.room-info-side h3 {
    font-size: 1.2rem;
    color: var(--third-color);
    margin-bottom: 5px;
}

.room-info-side p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.room-stats-side {
    display: flex;
    gap: 50px;
}

.stat-item {
    text-align: center;
}

.stat-item .label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 4px;
}

.stat-item .value {
    font-size: 1rem;
    font-weight: bold;
}

.select-btn-sm {
    background: var(--third-color);
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    min-width: 120px;
    font-size: 0.9rem;
    transition: 0.2s;
}

.select-btn-sm:hover {
    opacity: 0.9;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    z-index: 2000;
    transition: all 0.3s;
}

.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.modal-card {
    background: var(--secondary-color);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    padding: 8px 16px;
    background: var(--secondary-color);
    border-radius: 8px;
    color: var(--text-color);
    transition: 0.2s;
}

.page-link.active {
    background: var(--third-color);
    color: white;
}

.page-link:hover:not(.active):not(.disabled) {
    background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(260px);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .dashboard-main {
        margin-right: 0;
        padding: 20px;
    }
    .room-row-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .room-stats-side {
        gap: 30px;
    }
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
    .room-action-side {
        width: 100%;
    }
    .select-btn-sm {
        width: 100%;
    }
}



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

.profile-card {
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.05);
}

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

.large-avatar {
    width: 100px;
    height: 100px;
    background: var(--third-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 15px;
}

.profile-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--third-color);
}

.profile-details {
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-color);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-row .value {
    font-weight: bold;
    color: var(--text-color);
}

.large-avatar {
    width: 80px;
    height: 80px;
    background: var(--third-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
}

input:disabled {
    opacity: 0.7;
    border-color: #ddd !important;
}


.profile-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.btn-submit-sm {
    background-color: var(--third-color);
    color: var(--white-color);
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary-sm {
    background-color: transparent;
    color: var(--third-color);
    border: 1px solid var(--third-color);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-submit-sm:hover, .btn-secondary-sm:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .profile-actions-row {
        flex-direction: row; 
    }
    .btn-submit-sm, .btn-secondary-sm {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}