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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #3f3f3f;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Header Styles */
.portal-header {
    background-color: #17a2b8;
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: white;
    padding: 4px;
}

.portal-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* My Tickets Dropdown */
.my-tickets-dropdown {
    position: relative;
}

.my-tickets-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.my-tickets-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.dropdown-icon {
    transition: transform 0.2s;
}

.my-tickets-btn.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.dropdown-header h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

.new-ticket-small {
    background-color: transparent;
    border: none;
    color: #17a2b8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
}

.new-ticket-small:hover {
    text-decoration: underline;
}

.dropdown-tickets {
    padding: 0.5rem 0;
}

.dropdown-ticket-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.dropdown-ticket-item:hover {
    background-color: #f5f5f5;
}

.dropdown-ticket-title {
    font-size: 0.9rem;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.5rem;
}

.dropdown-ticket-status {
    background-color: #ff9800;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.see-all-link {
    display: block;
    text-align: center;
    padding: 0.75rem;
    color: #17a2b8;
    text-decoration: none;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.see-all-link:hover {
    background-color: #f5f5f5;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-sign-in {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-sign-in:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-sign-up {
    background-color: white;
    color: #17a2b8;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-sign-up:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: relative;
}

.user-avatar-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.user-avatar-btn:hover .user-avatar-img {
    opacity: 0.8;
}

.user-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 2000;
}

.user-menu-dropdown:hover .user-menu,
.user-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
}

.user-menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0.5rem 0;
}

.user-menu-item {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #333;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.user-menu-item:hover {
    background-color: #f5f5f5;
}

.user-menu-item svg {
    color: #666;
}

.user-menu-item:first-of-type {
    border-radius: 8px 8px 0 0;
}

.user-menu-item:last-of-type {
    border-radius: 0 0 8px 8px;
}

/* Admin Dashboard */
.admin-view {
    background-color: #f5f5f5;
    min-height: calc(100vh - 60px);
    padding: 2rem;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-title {
    font-size: 2rem;
    color: #333;
    font-weight: 600;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.admin-content {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Main Content */
.portal-main {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* Home View */
.home-view {
    padding: 0;
    min-height: calc(100vh - 60px);
    background-image: url('BCH logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
}

.search-container {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
    margin-bottom: auto;
    padding-bottom: 1.5rem;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 0 2rem;
}

.search-icon {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.logo-center {
    padding: 3rem 0;
    margin-bottom: auto;
    min-height: 200px;
}

.main-logo {
    display: none;
    max-width: 600px;
    width: 100%;
    height: auto;
}

.help-center {
    margin: 0 1rem 0 1rem;
    padding: 1.5rem 2rem 2rem 2rem;
    background-color: #f5f5f5;
    border-radius: 16px 16px 0 0;
    align-self: flex-end;
    width: calc(100% - 2rem);
}

.help-center-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.help-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.help-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.help-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #17a2b8;
    z-index: 1;
}

.card-image,
.help-card-image {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.help-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    padding: 1rem;
    margin: 0;
}

.help-card-description {
    font-size: 0.875rem;
    color: #666;
    padding: 0 1rem 1rem 1rem;
    margin: 0;
}

.card-title {
    font-size: 0.9rem;
    color: #333;
    margin: 0.65rem;
    font-weight: 600;
}

.card-description {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0.65rem 0.65rem 0.65rem;
    line-height: 1.35;
}

/* Tickets List View */
.tickets-view {
    background-color: white;
    min-height: calc(100vh - 60px);
    padding: 2rem;
}

.tickets-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.back-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #f0f0f0;
}

.tickets-title {
    font-size: 2rem;
    color: #333;
    margin: 0;
    flex: 1;
}

.tickets-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.tickets-search .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.tickets-search-input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.tickets-search-input:focus {
    outline: none;
    border-color: #17a2b8;
}

.new-ticket-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.new-ticket-button:hover {
    background-color: #138496;
}

.tickets-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.tab-button {
    background-color: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button:hover {
    color: #333;
}

.tab-button.active {
    color: #17a2b8;
    border-bottom-color: #17a2b8;
    font-weight: 500;
}

.tab-count {
    background-color: #f0f0f0;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.85rem;
}

.tab-button.active .tab-count {
    background-color: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.tickets-table {
    background-color: white;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1.2fr 3fr 0.8fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background-color: #f8f8f8;
    border-radius: 6px 6px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.table-body {
    border: 1px solid #e0e0e0;
    border-radius: 0 0 6px 6px;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 3fr 0.8fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
    align-items: center;
}

.col-description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.table-row:hover {
    background-color: #f9f9f9;
}

.status-badge {
    background-color: #ff9800;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.creator-info,
.assignee-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.creator-avatar,
.assignee-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.assignee-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ticket Detail View */
.ticket-detail-view {
    background-color: white;
    min-height: calc(100vh - 60px);
}

.ticket-detail-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    height: calc(100vh - 60px);
}

.ticket-sidebar {
    background-color: #fafafa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
}

.new-ticket-button-small {
    background-color: transparent;
    border: 1px solid #ddd;
    color: #333;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.new-ticket-button-small:hover {
    background-color: #f0f0f0;
}

.sidebar-search {
    position: relative;
    padding: 1rem;
}

.sidebar-search .search-icon {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-search-input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: #17a2b8;
}

.sidebar-tabs {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-tab {
    background-color: transparent;
    border: none;
    padding: 0.75rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    text-align: left;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
    margin-left: -1rem;
    padding-right: 1rem;
}

.sidebar-tab:hover {
    color: #333;
}

.sidebar-tab.active {
    color: #17a2b8;
    border-left-color: #17a2b8;
    font-weight: 500;
    background-color: rgba(23, 162, 184, 0.05);
}

.sidebar-tickets {
    flex: 1;
    overflow-y: auto;
}

.sidebar-ticket-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-ticket-item:hover {
    background-color: #f0f0f0;
}

.sidebar-ticket-item.active {
    background-color: #e3f2fd;
}

.sidebar-ticket-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-ticket-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.sidebar-ticket-status {
    margin-left: auto;
}

.sidebar-ticket-title {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-ticket-date {
    font-size: 0.8rem;
    color: #999;
}

.ticket-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ticket-content-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticket-content-title {
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
}

.ticket-status-badge {
    background-color: #ff9800;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 500;
}

.close-detail-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-detail-button:hover {
    background-color: #f0f0f0;
}

.ticket-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background-color: #fafafa;
}

.message {
    margin-bottom: 1.5rem;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #17a2b8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.message-info {
    flex: 1;
}

.message-sender {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.message-time {
    font-size: 0.85rem;
    color: #999;
}

.message-body {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-left: 3rem;
    line-height: 1.5;
}

.message-notice {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

.message-link {
    color: #17a2b8;
    text-decoration: none;
}

.message-link:hover {
    text-decoration: underline;
}

.read-more-btn {
    background-color: transparent;
    border: none;
    color: #17a2b8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.read-more-btn:hover {
    text-decoration: underline;
}

.user-response {
    background-color: #f0f0f0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-left: 3rem;
    margin-top: 0.75rem;
}

.message-input-container {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background-color: white;
}

.message-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.message-input:focus {
    outline: none;
    border-color: #17a2b8;
}

.attach-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #138496;
}

.send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-content {
    background-color: #f0f1f3;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 1rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: white;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f5;
}

.modal-body {
    padding: 0;
}

.modal-body iframe {
    border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .help-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .ticket-detail-layout {
        grid-template-columns: 320px 1fr;
    }

    .help-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-nav {
        padding: 0.75rem 1rem;
    }

    .tickets-header {
        flex-wrap: wrap;
    }

    .tickets-search {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .table-header,
    .table-row {
        grid-template-columns: 2fr 0.8fr 0.8fr;
    }

    .col-assignee,
    .assignee-info,
    .col-creator,
    .creator-info {
        display: none;
    }

    .ticket-detail-layout {
        grid-template-columns: 1fr;
    }

    .ticket-sidebar {
        display: none;
    }

    .help-cards {
        grid-template-columns: 1fr;
    }
}

/* Admin Resources Management */
.admin-resources-view {
    background-color: #f5f5f5;
    min-height: calc(100vh - 60px);
    padding: 2rem;
}

.admin-resources-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-resources-title {
    font-size: 1.75rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.admin-resources-subtitle {
    font-size: 0.95rem;
    color: #666;
}

.admin-resources-actions {
    margin-bottom: 2rem;
}

.btn-add-resource {
    background-color: #0073e6;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-add-resource:hover {
    background-color: #0063cc;
}

.resources-group {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.resources-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.resources-group-header h2 {
    font-size: 1.125rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.resources-count {
    background-color: #e0e0e0;
    color: #666;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.btn-delete-group {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-delete-group:hover {
    opacity: 1;
}

.resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0073e6;
    border-radius: 6px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
}

.resource-item:hover {
    background-color: #f5f5f5;
    border-left-color: #0063cc;
}

.resource-item.dragging {
    opacity: 0.5;
}

.resource-drag-handle {
    cursor: grab;
    color: #999;
}

.resource-drag-handle:active {
    cursor: grabbing;
}

.resource-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resource-icon.form-icon {
    background-color: #e8f5e9;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.125rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.resource-title {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-resource,
.btn-delete-resource {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s;
}

.btn-edit-resource:hover,
.btn-delete-resource:hover {
    opacity: 1;
    background-color: #e0e0e0;
}

.btn-add-resource-inline {
    background: none;
    border: 1px dashed #ccc;
    color: #666;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-add-resource-inline:hover {
    border-color: #999;
    color: #333;
    background-color: #fafafa;
}

/* Resource Modal */
.resource-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.required {
    color: #e74c3c;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #0073e6;
}

.form-textarea {
    resize: vertical;
}

.image-upload-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.image-preview {
    position: relative;
    width: 200px;
    height: 120px;
    border: 2px solid #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    flex-shrink: 0;
    overflow: hidden;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 200px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
    gap: 0.5rem;
}

.image-placeholder:hover {
    border-color: #999;
    background-color: #f5f5f5;
}

.placeholder-text {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.image-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s;
}

.btn-upload:hover {
    border-color: #999;
    background-color: #f5f5f5;
}

.btn-change-image {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid white;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-change-image:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.btn-remove-image {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid white;
    border-radius: 4px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-remove-image:hover {
    background-color: rgba(220, 53, 69, 1);
}

.image-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel {
    padding: 0.625rem 1.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.btn-save {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 6px;
    background-color: #0073e6;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-save:hover {
    background-color: #0063cc;
}
/* Ticket Detail View - Chat Layout */
.ticket-detail-view {
    background-color: white;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.ticket-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.ticket-detail-header .back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.ticket-detail-header .back-button:hover {
    background-color: #f0f0f0;
}

.ticket-detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.ticket-status-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f8f8;
    border-radius: 8px;
}

.status-label {
    font-weight: 600;
    color: #666;
    font-size: 0.95rem;
}

.ticket-status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: #2196f3;
    color: white;
}

.ticket-status-badge.status-new {
    background-color: #2196f3;
}

.ticket-status-badge.status-open {
    background-color: #ff9800;
}

.ticket-status-badge.status-in-progress {
    background-color: #9c27b0;
}

.ticket-status-badge.status-resolved,
.ticket-status-badge.status-closed {
    background-color: #4caf50;
}

.ticket-chat-panel {
    flex: 1;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    min-height: 400px;
}

.ticket-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.chat-message-user {
    flex-direction: row;
}

.chat-message-support {
    flex-direction: row;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #17a2b8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chat-message-support .message-avatar {
    background-color: #4caf50;
}

.message-content {
    flex: 1;
    background-color: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-sender-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.message-timestamp {
    font-size: 0.85rem;
    color: #999;
}

.message-text {
    color: #555;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

.message-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.message-input:focus {
    border-color: #17a2b8;
}

.send-button {
    padding: 0.75rem 1.5rem;
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #138496;
}

.send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-detail-view {
        padding: 1rem;
    }

    .ticket-detail-title {
        font-size: 1.25rem;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .chat-message {
        gap: 0.75rem;
    }
}

/* Description Container */
.ticket-description-container {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background-color: #f8f8f8;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.description-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-text {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1.5rem;
}
