@font-face {
    font-family: 'IRANYekan';
    src: url('fonts/woff2/IRANYekanXFaNum-Regular.woff2') format('woff2'),
        url('fonts/woff/IRANYekanXFaNum-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekan';
    src: url('fonts/woff2/IRANYekanXFaNum-Bold.woff2') format('woff2'),
        url('fonts/woff/IRANYekanXFaNum-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekan';
    src: url('fonts/woff2/IRANYekanXFaNum-Medium.woff2') format('woff2'),
        url('fonts/woff/IRANYekanXFaNum-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekan';
    src: url('fonts/woff2/IRANYekanXFaNum-Light.woff2') format('woff2'),
        url('fonts/woff/IRANYekanXFaNum-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

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

body {
    font-family: 'IRANYekan', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    direction: rtl;
    padding: 20px;
    color: #333;
}

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

/* Form Styles */
.form-wrapper {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 40px;
}

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

.form-header h1 {
    color: #ff6b35;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-header p {
    color: #666;
    font-size: 14px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #333;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'IRANYekan', sans-serif;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
}

.form-group small {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-submit {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'IRANYekan', sans-serif;
}

.btn-submit:hover {
    background: #e65a2a;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Message Styles */
.message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

/* Ticket Styles */
.ticket-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.ticket {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.ticket-header {
    background: #ff6b35;
    color: white;
    padding: 30px;
    text-align: center;
}

.ticket-header h1 {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.ticket-logo {
    margin-top: 10px;
}

.ticket-logo img {
    width: 80px;
    height: auto;
    object-fit: contain;
}

.ticket-body {
    padding: 30px;
}

.ticket-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ticket-field:last-child {
    border-bottom: none;
}

.field-label {
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.field-value {
    color: #333;
    font-weight: 500;
    font-size: 15px;
}

.code-highlight {
    background: #ff6b35;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
}

.title-badge {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    background: #f5f5f5;
    color: #666;
    width: fit-content;
}

.title-badge.اجرایی {
    background: #fff3e0;
    color: #e65100;
}

.title-badge.لیدر {
    background: #e3f2fd;
    color: #1565c0;
}

.title-badge.اعضا {
    background: #f3e5f5;
    color: #6a1b9a;
}

.title-badge.میهمان {
    background: #fce4ec;
    color: #c2185b;
}

.ticket-footer {
    background: #fafafa;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.ticket-footer p {
    color: #666;
    margin-bottom: 15px;
    font-size: 13px;
}

.ticket-barcode {
    display: flex;
    justify-content: center;
    gap: 3px;
    height: 50px;
}

.barcode-line {
    width: 3px;
    background: #333;
    opacity: 0.7;
}

.barcode-line:nth-child(even) {
    width: 2px;
}

.ticket-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-print,
.btn-back {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'IRANYekan', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.btn-print {
    background: #ff6b35;
    color: white;
    border: none;
}

.btn-back {
    background: white;
    color: #ff6b35;
    border: 1px solid #ff6b35;
}

.btn-print:hover {
    background: #e65a2a;
}

.btn-back:hover {
    background: #fff5f2;
}

/* Error Message */
.error-message {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 60px 40px;
    text-align: center;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 600;
}

.error-message p {
    color: #666;
    margin-bottom: 30px;
}

/* Welcome Message */
.welcome-message {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 60px 40px;
    text-align: center;
}

.welcome-icon {
    margin-bottom: 20px;
}

.welcome-icon img {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.welcome-message h1 {
    color: #ff6b35;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

.welcome-message p {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
}

.welcome-message .highlight {
    color: #ff6b35;
    font-weight: 600;
}

/* Admin Styles */
.admin-body {
    background: #f5f5f5;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 30px;
    margin-bottom: 20px;
}

.admin-header h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.btn-add,
.btn-export,
.btn-link {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'IRANYekan', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 14px;
}

.btn-add {
    background: #ff6b35;
    color: white;
    border: none;
    flex: 1;
}

.btn-export {
    background: transparent;
    color: #999;
    border: 1px solid #ccc;
    padding: 8px 15px;
    font-size: 13px;
}

.btn-link {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.btn-add:hover {
    background: #e65a2a;
}

.btn-export:hover {
    background: #fafafa;
    color: #666;
    border-color: #999;
}

.btn-link:hover {
    background: #fafafa;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(224, 224, 224, 0.6);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b35;
    direction: ltr;
}

.search-bar {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.search-bar input {
    flex: 1;
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'IRANYekan', sans-serif;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: #ff6b35;
}

.guests-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 30px;
}

.guests-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.guests-list {
    display: flex;
    flex-direction: column;
    gap: 0;

    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
}

/* Table Header */
.guest-table-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr 1.5fr 1fr 0.8fr 1.2fr;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-bottom: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    align-items: center;
}

.guest-card {
    display: grid;
    grid-template-columns: 1fr;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
    background: white;
    position: relative;
}

.guest-card:hover {
    background: #fafafa;
}

.guest-card:last-child {
    border-radius: 0 0 8px 8px;
}

.guest-card-info {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr 1.5fr 1fr 0.8fr 1.2fr;
    gap: 15px;
    align-items: center;
    cursor: default;
}

.guest-code {
    background: #e8e8e8;
    color: #000;
    padding: 5px 10px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    width: fit-content;
}

.guest-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-label {
    display: none;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}

.guest-actions.active {
    display: flex;
}

.btn-edit,
.btn-delete,
.btn-view {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-family: 'IRANYekan', sans-serif;
    font-weight: 600;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    white-space: nowrap;
    background: #e8e8e8;
    color: #444;
}

.btn-edit:hover,
.btn-delete:hover,
.btn-view:hover {
    background: #d0d0d0;
    color: #222;
}

.no-results {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.close {
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.guest-form {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-family: 'IRANYekan', sans-serif;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    font-size: 14px;
}

.btn-cancel:hover {
    background: #fafafa;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .ticket-actions {
        display: none;
    }

    .ticket {
        border: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .form-wrapper {
        padding: 25px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .ticket-logo img {
        width: 60px;
    }

    .welcome-icon img {
        width: 90px;
    }

    .admin-header {
        padding: 20px;
    }

    .admin-header h1 {
        font-size: 20px;
    }

    .admin-actions {
        flex-direction: row;
        gap: 8px;
    }

    .btn-add {
        flex: 1;
    }

    .btn-export {
        flex: 0 0 auto;
    }

    .btn-link {
        width: 100%;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-box {
        padding: 15px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .search-bar {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .search-bar input {
        width: 100%;
        min-width: 100%;
    }

    /* Mobile table view */
    .guest-table-header {
        display: none;
    }

    .guest-card {
        padding: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .guest-card:last-child {
        border-radius: 8px;
    }

    .guest-card {
        display: block;
    }

    .guest-card-info {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .guest-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .info-label {
        display: block;
        font-size: 11px;
        color: #666;
        font-weight: 500;
    }

    .guest-actions {
        display: none;
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e0e0e0;
    }

    .guest-actions.active {
        display: flex;
    }

    .btn-edit,
    .btn-delete,
    .btn-view {
        flex: 1;
        min-width: 80px;
    }

    .ticket-actions {
        flex-direction: column;
    }

    .btn-print,
    .btn-back {
        width: 100%;
        text-align: center;
    }
}