@import url('style.css');
@import url('software.css');

/* Admin Layout & Specific Extensions */
.container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 3rem 3rem !important;
}

.admin-login-container {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.admin-login-card {
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-shape-corner-extra-large);
    padding: 3rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.admin-login-card h2 {
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 1rem;
}

.admin-login-card p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.admin-login-error {
    color: var(--md-sys-color-error);
    font-size: 0.85rem;
    margin-top: 1rem;
    display: none;
}

.admin-dashboard-container {
    display: none;
}

.admin-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.admin-dashboard-header h2 {
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
    font-size: 1.8rem;
}

#adminUserEmail {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.875rem;
    margin-top: 0.2rem;
}

.admin-header-actions {
    display: flex;
    gap: 1rem;
}

.admin-secondary-btn {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    box-shadow: none;
}

.admin-controls-footer {
    padding-top: 0.5rem;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.admin-reset-btn {
    background: transparent;
    border: none;
    color: var(--md-sys-color-primary);
}

.admin-fetching-text {
    color: var(--md-sys-color-on-surface-variant);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(28, 27, 31, 0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal-content {
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-shape-corner-extra-large);
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--md-elevation-2);
}

.modal-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header-flex h3 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--md-sys-color-on-surface);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.modal-filesize-group {
    display: flex;
    gap: 0.5rem;
}

.modal-filesize-group input {
    flex: 2;
}

.modal-filesize-group select {
    flex: 1;
}

.modal-textarea-field {
    margin-bottom: 2.5rem;
}

.modal-footer-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-cancel-btn {
    background: transparent;
    color: var(--md-sys-color-primary);
}

.category-add-form {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    padding-bottom: 1.5rem;
}

.category-submit-btn {
    width: 100%;
}

.existing-categories-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 250px;
    overflow-y: auto;
}

/* Icon Picker Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 12px;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.8rem;
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-medium);
    margin-top: 0.5rem;
}

.icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: var(--md-shape-corner-small);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--md-sys-color-surface-container-low);
}

.icon-option img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.icon-option:hover {
    background: var(--md-sys-color-surface-container);
}

.icon-option.selected {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

/* Form Fields & Buttons */
.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 0.3rem;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.form-field input, .form-field textarea, .form-field select {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 4px;
    color: var(--md-sys-color-on-surface);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
    outline: none;
    border: 2px solid var(--md-sys-color-primary);
    padding: calc(1rem - 1px);
}

.btn-subtle-danger {
    background-color: transparent;
    color: var(--md-sys-color-error);
    border: 1px solid var(--md-sys-color-error);
    padding: 0.6rem 1.2rem;
    border-radius: var(--md-shape-corner-full);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-subtle-danger:hover {
    background-color: rgba(179, 38, 30, 0.08);
}

/* Footer image / links specifics */
.footer-logo-img {
    margin-bottom: 1rem; 
    height: 140px; 
    max-width: 100%;
}

.footer-copy-text {
    margin-top: 1.5rem; 
    opacity: 0.7; 
    font-size: 0.85rem;
}

.footer-status-link {
    opacity: 0.6; 
    cursor: default;
}

.footer-admin-link {
    color: var(--md-sys-color-primary); 
    font-weight: 600; 
    margin-top: 1rem;
}