/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #5e72e4;
    min-height: 100vh;
    color: #333;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    color: #5e72e4;
}

/* Login Card */
.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    margin: 100px auto;
}

.login-card h1 {
    color: #5e72e4;
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}

.subtitle {
    text-align: center;
    color: #525f7f;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #5e72e4;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #5e72e4;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #4c63d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #8898aa;
    color: white;
}

.btn-secondary:hover {
    background: #6a7f99;
}

.btn-danger {
    background: #fb6340;
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-danger:hover {
    background: #ea5231;
}

/* Content Area */
.content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.content h2 {
    color: #333;
    margin-bottom: 10px;
}

.welcome-text {
    color: #525f7f;
    margin-bottom: 30px;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resource-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid #e3e8ee;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #5e72e4;
}

.resource-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.resource-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.user-count {
    color: #525f7f;
    margin-bottom: 20px;
    font-size: 14px;
}

.count {
    font-weight: 700;
    color: #5e72e4;
    font-size: 18px;
}

.create-ticket {
    width: 100%;
}

/* Ticket Card */
.ticket-card {
    max-width: 600px;
    margin: 0 auto;
}

.ticket-card h2 {
    color: #5e72e4;
    margin-bottom: 30px;
    text-align: center;
}

.ticket-info {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e3e8ee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    color: #525f7f;
}

.info-row .value {
    font-weight: 700;
    color: #333;
    font-size: 18px;
}

/* Active Ticket Notice */
.active-ticket-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.active-ticket-notice a {
    color: #5e72e4;
    font-weight: 600;
    text-decoration: underline;
}

/* Error Message */
.error-message {
    color: #fb6340;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

/* Success Message */
.success-message {
    color: #2dce89;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #f7fafc;
    border-top: 3px solid #5e72e4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .login-card {
        margin: 50px auto;
        padding: 30px 20px;
    }
    
    .login-card h1 {
        font-size: 28px;
    }
    
    .content {
        padding: 20px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .resource-card {
        padding: 20px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 15px;
        margin: 30px auto;
    }
    
    .content h2 {
        font-size: 22px;
    }
    
    .resource-icon {
        font-size: 40px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
