@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #165f40;
    --secondary-color: #46815e;
    --accent-color: #dac717;
    --light-bg: #fafcfb;
    --white: #ffffff;
    --dark-text: #165f40;
    --light-text: #46815e;
    --gray-text: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(22, 95, 64, 0.1);
    --shadow-hover: 0 4px 8px rgba(22, 95, 64, 0.15);
    --shadow-lg: 0 8px 16px rgba(22, 95, 64, 0.2);
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--light-bg);
    color: var(--dark-text);
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.login-btn,
.signup-btn {
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.login-btn {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.login-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.signup-btn {
    background: var(--accent-color);
    color: var(--primary-color);
}

.signup-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-btn {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-btn:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Search Section */
.search-section {
    background: var(--light-bg);
    padding: 4rem 0;
    min-height: 100vh;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.search-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-text);
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Search Bar */
.search-bar-container {
    margin-bottom: 2rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.1rem;
}

#search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1.1rem;
    background: var(--white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(70, 129, 94, 0.1);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow);
}

.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--light-bg);
    transition: background-color 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: var(--light-bg);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Filters */
.filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.clear-filters-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: end;
    transition: background-color 0.3s ease;
}

.clear-filters-btn:hover {
    background: #c82333;
}

/* Search Results */
.search-results {
    margin-top: 2rem;
}

.results-header {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

#results-count {
    font-weight: 600;
    color: var(--gray-text);
    font-size: 1.1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.research-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.research-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.research-authors {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.research-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray-text);
}

.research-abstract {
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.request-btn {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: fit-content;
}

.request-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* About Section */
.about-section {
    background: var(--white);
    padding: 4rem 0;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.about-section h2 {
    font-size: 2.5rem;
    color: var(--dark-text);
    margin-bottom: 3rem;
    font-weight: 700;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    padding: 2rem;
    border-radius: 15px;
    background: var(--light-bg);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.about-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-card p {
    color: var(--gray-text);
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    background: var(--light-bg);
    padding: 4rem 0;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-text);
    margin-bottom: 3rem;
    font-weight: 700;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    width: 40px;
    text-align: center;
}

.contact-item h4 {
    color: var(--dark-text);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-item p {
    color: var(--gray-text);
    margin: 0;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px 0;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    width: 95%;
    max-width: 500px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 40px rgba(22, 95, 64, 0.15);
    border: 1px solid rgba(22, 95, 64, 0.1);
}

/* Override for signup modals */
.modal-content.signup-role-modal,
.modal-content.signup-form-modal {
    max-width: 500px !important;
    width: 90% !important;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-text);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--dark-text);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
    font-weight: 700;
}

.login-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 0.7rem;
    border: none;
    background: var(--light-bg);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.tab-btn.active {
    background: var(--secondary-color);
    color: white;
}

.login-form,
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.signup-form {
    animation: slideInUp 0.3s ease;
    padding-top: 0.5rem;
}

.login-form .form-group {
    margin-bottom: 1.2rem;
}

/* New Professional Signup Form Styles */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(70, 129, 94, 0.02);
    border: 1px solid rgba(70, 129, 94, 0.1);
    border-radius: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(70, 129, 94, 0.1);
    padding-bottom: 0.75rem;
}

.section-title i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-text);
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--gray-text);
    z-index: 1;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(70, 129, 94, 0.1);
}

.input-wrapper input:focus ~ i {
    color: var(--secondary-color);
}

.signup-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.signup-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.signup-footer a:hover {
    text-decoration: underline;
}

.back-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--primary-color);
}

.back-btn i {
    font-size: 0.8rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.strength-fill.fair {
    width: 50%;
    background: #ffc107;
}

.strength-fill.good {
    width: 75%;
    background: #28a745;
}

.strength-fill.strong {
    width: 100%;
    background: var(--secondary-color);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--gray-text);
}

/* Password Match Indicator */
.password-match {
    margin-top: 0.5rem;
}

.match-text {
    font-size: 0.75rem;
}

.match-text.match {
    color: var(--secondary-color);
}

.match-text.no-match {
    color: #dc3545;
}

/* Password Requirements */
.password-requirements {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(70, 129, 94, 0.1);
    border: 1px solid rgba(70, 129, 94, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.password-requirements i {
    color: var(--secondary-color);
}

/* Username Feedback */
.username-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.username-feedback i {
    font-size: 0.9rem;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group i { 
    left: 1.2rem;
    top: 1.2rem;
    color: var(--gray-text);
    z-index: 1;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    transition: all 0.3s ease;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(22, 95, 64, 0.05);
}

.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1rem;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(70, 129, 94, 0.15);
    transform: translateY(-1px);
}

.form-group input:focus ~ i,
.form-group select:focus ~ i {
    color: var(--secondary-color);
}

.form-group input::placeholder {
    color: var(--gray-text);
    font-weight: 400;
    opacity: 0.8;
}



.role-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.role-btn {
    padding: 2rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(22, 95, 64, 0.05);
}

.role-btn:hover {
    border-color: var(--secondary-color);
    background: var(--light-bg);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(70, 129, 94, 0.15);
}

.role-btn.selected {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(70, 129, 94, 0.25);
}

.role-btn i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.role-btn.selected i {
    color: var(--white);
}

.role-btn span {
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.role-btn small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray-text);
    display: block;
    line-height: 1.3;
}

.role-btn.selected small {
    color: rgba(255, 255, 255, 0.9);
}

.role-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.role-btn:hover::before {
    left: 100%;
}

.role-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.role-btn:active::after {
    width: 200px;
    height: 200px;
}

.login-submit-btn,
.signup-submit-btn {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(218, 199, 23, 0.3);
    position: relative;
    overflow: hidden;
}

.login-submit-btn::before,
.signup-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-submit-btn:hover::before,
.signup-submit-btn:hover::before {
    left: 100%;
}

.login-submit-btn:hover,
.signup-submit-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 95, 64, 0.3);
}

.login-submit-btn:disabled,
.signup-submit-btn:disabled {
    cursor: not-allowed;
    transform: none;
    background: var(--secondary-color);
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 0.6; }
    100% { opacity: 0.8; }
}

.login-submit-btn:disabled:hover,
.signup-submit-btn:disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Loading spinner animation for buttons */
.login-submit-btn .fa-spinner,
.signup-submit-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive button improvements */
@media (max-width: 768px) {
    .login-submit-btn,
    .signup-submit-btn {
        padding: 1rem 1.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
        width: 100%;
        margin-top: 0.5rem;
    }

    .login-submit-btn:disabled,
    .signup-submit-btn:disabled {
        opacity: 0.8;
    }
}

.signup-submit-btn.invalid {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6c757d;
    color: #fff;
}

.signup-submit-btn.invalid:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard {
    padding-top: 40px;
    min-height: 100vh;
    background: var(--light-bg);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray-text);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(22, 95, 64, 0.1);
    color: var(--primary-color);
}

.stat-icon.secondary {
    background: rgba(70, 129, 94, 0.1);
    color: var(--secondary-color);
}

.stat-icon.accent {
    background: rgba(218, 199, 23, 0.1);
    color: var(--accent-color);
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--dark-text);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .search-section h2,
    .about-section h2,
    .contact-section h2 {
        font-size: 2rem;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .role-buttons {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-container,
    .about-container,
    .contact-container {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
        max-width: 95%;
        border-radius: 16px;
    }

    .form-group input,
    .form-group select {
        padding: 1rem 1rem 1rem 2.8rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-group i {
        left: 1rem;
        top: 1rem;
    }

    /* Mobile responsive for new signup form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .input-wrapper input {
        padding: 0.9rem 0.9rem 0.9rem 2.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .input-wrapper i {
        left: 0.8rem;
    }


    
    .dashboard-container {
        padding: 1rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-bg);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CLEAN MODAL ALERT SYSTEM - PHASE 2 */
.modal-alert {
    margin-bottom: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideInAlert 0.3s ease;
}

.modal-alert.show {
    display: flex;
}

.modal-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.modal-alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.modal-alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #d97706;
}

.modal-alert i {
    font-size: 16px;
}

@keyframes slideInAlert {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MODERN SIGNUP ROLE SELECTION */
.signup-role-modal {
    max-width: 500px;
    width: 90%;
    padding: 1.5rem;
}

.role-selection-subtitle {
    text-align: center;
    color: var(--gray-text);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.role-selection {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.role-card {
    background: var(--white) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(22, 95, 64, 0.08);
    min-height: 280px;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    visibility: visible !important;
    opacity: 1 !important;
}

.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(70, 129, 94, 0.1), transparent);
    transition: left 0.5s;
}

.role-card:hover::before {
    left: 100%;
}

.role-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(70, 129, 94, 0.15);
}

.role-card.selected {
    border-color: var(--accent-color);
    background: rgba(218, 199, 23, 0.05);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(218, 199, 23, 0.2);
    animation: selectPulse 0.3s ease;
}

@keyframes selectPulse {
    0% { transform: translateY(-5px) scale(1); }
    50% { transform: translateY(-5px) scale(1.05); }
    100% { transform: translateY(-5px) scale(1.02); }
}

.role-icon {
    width: 80px;
    height: 80px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.role-card:hover .role-icon,
.role-card.selected .role-icon {
    background: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

.role-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.role-card p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.role-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: auto;
    padding-top: 1rem;
}

.role-features span {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    justify-content: flex-start;
}

.role-features i {
    color: var(--accent-color);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

/* RESPONSIVE SIGNUP FORM */
.signup-form-modal {
    max-width: 900px;
    padding: 2.5rem;
}

.signup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    background: var(--light-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-text);
}

.back-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateX(-2px);
}

.signup-title h2 {
    margin: 0;
    color: var(--primary-color);
}

.selected-role {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
}

.selected-role span {
    color: var(--secondary-color);
    font-weight: 600;
}

.responsive-signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Desktop enhancements */
@media (min-width: 769px) {
    .responsive-signup-form {
        gap: 2rem;
    }

    .form-row {
        gap: 2.5rem;
    }

    .signup-submit-btn {
        max-width: 300px;
        margin: 1.5rem auto 0;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-alert {
        padding: 10px 14px;
        font-size: 13px;
    }

    .modal-alert i {
        font-size: 14px;
    }

    .signup-role-modal,
    .signup-form-modal {
        padding: 1rem;
        width: 95% !important;
        max-width: 95% !important;
    }

    .role-selection {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
    }

    .role-card {
        width: 250px !important;
        max-width: 90% !important;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .signup-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .back-btn {
        align-self: flex-start;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .signup-role-modal {
        padding: 1rem !important;
        width: 98% !important;
    }

    .role-card {
        padding: 1.2rem !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* ===== MODERN SIGNUP MODAL STYLES ===== */

/* Role Selection Modal */
.modern-signup-modal {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 252, 251, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(22, 95, 64, 0.1);
    border-radius: 24px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    box-shadow: 
        0 25px 50px -12px rgba(22, 95, 64, 0.25),
        0 0 0 1px rgba(22, 95, 64, 0.05);
    overflow: hidden;
    position: relative;
}

.modern-signup-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

.modern-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(22, 95, 64, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-text);
    z-index: 10;
}

.modern-close-btn:hover {
    background: rgba(22, 95, 64, 0.15);
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-header {
    padding: 40px 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(22, 95, 64, 0.02) 0%, rgba(70, 129, 94, 0.03) 100%);
}

.brand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 8px 32px rgba(22, 95, 64, 0.3);
}

.modal-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0;
    color: var(--gray-text);
    font-size: 1rem;
    font-weight: 400;
}

.role-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px 40px 40px;
}

.modern-role-card {
    background: white;
    border: 2px solid rgba(22, 95, 64, 0.08);
    border-radius: 16px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.modern-role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(22, 95, 64, 0.04), transparent);
    transition: left 0.6s ease;
}

.modern-role-card:hover::before {
    left: 100%;
}

.modern-role-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary-color);
    box-shadow: 0 20px 40px rgba(22, 95, 64, 0.15);
}

.modern-role-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(22, 95, 64, 0.03) 0%, rgba(70, 129, 94, 0.02) 100%);
    transform: translateY(-4px);
}

.role-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.role-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(22, 95, 64, 0.1) 0%, rgba(70, 129, 94, 0.15) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.modern-role-card:hover .role-icon-wrapper {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    transform: scale(1.1);
}

.role-card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.role-description {
    color: var(--gray-text);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.role-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(22, 95, 64, 0.04);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.feature-item i {
    width: 16px;
    font-size: 14px;
    color: var(--accent-color);
}

.role-card-footer {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0;
    transition: all 0.3s ease;
}

.modern-role-card.selected .role-card-footer {
    opacity: 1;
}

.select-indicator {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(22, 95, 64, 0.3);
}

/* Form Modal */
.modern-form-modal {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 50px -12px rgba(22, 95, 64, 0.25),
        0 0 0 1px rgba(22, 95, 64, 0.05);
    position: relative;
}

.modern-form-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

.form-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(22, 95, 64, 0.08);
}

.modern-back-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(22, 95, 64, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

.modern-back-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateX(-2px);
}

.form-header-section {
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, rgba(22, 95, 64, 0.02) 0%, rgba(70, 129, 94, 0.03) 100%);
}

.selected-role-badge {
    display: flex;
    align-items: center;
    gap: 20px;
}

.role-badge-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.role-badge-text h2 {
    margin: 0 0 4px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.role-badge-text p {
    margin: 0;
    color: var(--gray-text);
    font-size: 1rem;
}

.role-highlight {
    color: var(--secondary-color);
    font-weight: 600;
}

.modern-signup-form {
    padding: 30px;
}

.form-section {
    margin-bottom: 32px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(22, 95, 64, 0.1);
}

.section-label i {
    width: 20px;
    color: var(--secondary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modern-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-form-group.full-width {
    grid-column: 1 / -1;
}

.modern-form-group label {
    font-weight: 500;
    color: var(--dark-text);
    font-size: 0.9rem;
    margin-left: 4px;
}

.input-container {
    position: relative;
}

.input-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-text);
    transition: color 0.3s ease;
    z-index: 1;
}

.input-container input,
.input-container select {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid rgba(22, 95, 64, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: rgba(250, 252, 251, 0.5);
}

.input-container input:focus,
.input-container select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(70, 129, 94, 0.1);
}

.input-container input:focus ~ i,
.input-container select:focus ~ i {
    color: var(--secondary-color);
}

.password-strength {
    position: absolute;
    bottom: 2px;
    left: 48px;
    right: 16px;
    height: 3px;
    background: rgba(22, 95, 64, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    transition: all 0.3s ease;
}

.input-hint {
    font-size: 0.8rem;
    color: var(--gray-text);
    margin-left: 4px;
}

.modern-submit-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.modern-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(22, 95, 64, 0.3);
}

.modern-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-submit-btn.loading .btn-content {
    opacity: 0;
}

.modern-submit-btn.loading .btn-loading {
    opacity: 1;
}

.modal-footer-modern {
    padding: 20px 30px 30px;
    text-align: center;
    border-top: 1px solid rgba(22, 95, 64, 0.08);
    background: rgba(250, 252, 251, 0.5);
}

.modal-footer-modern p {
    margin: 0;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.login-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Modern Alert System */
.modern-alert {
    margin: 20px 30px;
    padding: 0;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-alert.show {
    opacity: 1;
    transform: translateY(0);
    padding: 16px 20px;
}

.modern-alert.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.modern-alert.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.modern-alert.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #d97706;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-signup-modal,
    .modern-form-modal {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }
    
    .role-selection-grid {
        grid-template-columns: 1fr;
        padding: 15px 20px 20px;
        gap: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 25px 20px 15px;
    }
    
    .form-header-section,
    .modern-signup-form {
        padding: 20px;
    }
    
    .selected-role-badge {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .modern-role-card {
        padding: 20px 16px;
    }

    .role-description {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .feature-item {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }

    .modern-signup-modal {
        width: 100%;
        margin: 0;
        border-radius: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modern-form-modal {
        width: 100%;
        margin: 0;
        border-radius: 16px;
        max-height: 95vh;
    }

    /* Compact header for mobile */
    .modal-header {
        padding: 20px 15px 10px;
    }

    .brand-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    /* Compact role selection */
    .role-selection-grid {
        padding: 10px 15px 15px;
        gap: 12px;
    }

    .modern-role-card {
        padding: 16px 12px;
        border-radius: 12px;
    }

    .role-icon-wrapper {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 20px;
        margin-bottom: 12px;
    }

    .role-card-header h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .role-description {
        font-size: 0.8rem;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .role-features {
        gap: 8px;
    }

    .feature-item {
        padding: 5px 8px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .feature-item i {
        width: 14px;
        font-size: 12px;
    }

    /* Compact footer */
    .modal-footer-modern {
        padding: 15px 15px 20px;
    }

    .modal-footer-modern p {
        font-size: 0.85rem;
    }

    /* Form modal adjustments */
    .form-modal-header {
        padding: 15px 15px;
    }

    .modern-back-btn,
    .modern-close-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .form-header-section {
        padding: 20px 15px 15px;
    }

    .role-badge-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 20px;
    }

    .role-badge-text h2 {
        font-size: 1.3rem;
    }

    .modern-signup-form {
        padding: 15px;
    }

    .form-section {
        margin-bottom: 20px;
    }

    .section-label {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .modern-form-group {
        gap: 6px;
    }

    .modern-form-group label {
        font-size: 0.85rem;
    }

    .input-container input,
    .input-container select {
        padding: 12px 12px 12px 40px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .input-container i {
        left: 12px;
        font-size: 14px;
    }

    .modern-submit-btn {
        padding: 14px;
        border-radius: 10px;
        font-size: 0.95rem;
        margin-top: 15px;
    }

    .modern-alert {
        margin: 15px;
    }

    .modern-alert.show {
        padding: 12px 15px;
    }

    /* Ensure modal fits in viewport */
    .modern-signup-modal .modal-header,
    .modern-signup-modal .role-selection-grid,
    .modern-signup-modal .modal-footer-modern {
        flex-shrink: 0;
    }

    /* Close button positioning */
    .modern-close-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
    }
}
