/* DigitalPrank Support System Styles */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f9fafb;
    --dark: #1f2937;
    --border: #e5e7eb;
    --text: #374151;
    --text-light: #6b7280;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.support-header {
    background: var(--gradient);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    height: 36px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: white;
}

.header-nav .btn-login {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.header-nav .btn-login:hover {
    background: rgba(255,255,255,0.3);
}

.user-name {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

/* Main */
.support-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Footer */
.support-footer {
    background: var(--dark);
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-container p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* Page Title */
.page-title {
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.page-title p {
    color: var(--text-light);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--danger);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 0.375rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--light);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status & Priority Badges */
.status-badge,
.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Ticket List */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.ticket-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ticket-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.ticket-info h3 a {
    color: inherit;
    text-decoration: none;
}

.ticket-info h3 a:hover {
    color: var(--primary);
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.ticket-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ticket-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

/* Ticket View */
.ticket-header {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.ticket-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.ticket-number {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.ticket-subject {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.ticket-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.ticket-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ticket-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.ticket-detail-value {
    font-weight: 500;
    color: var(--dark);
}

/* Replies */
.replies-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.replies-header {
    padding: 1rem 1.5rem;
    background: var(--light);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--dark);
}

.reply-list {
    padding: 0;
}

.reply-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-item.admin {
    background: #f0f9ff;
}

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

.reply-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reply-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.reply-item.admin .reply-avatar {
    background: var(--dark);
}

.reply-name {
    font-weight: 600;
    color: var(--dark);
}

.reply-badge {
    font-size: 0.6875rem;
    background: var(--primary);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.reply-time {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.reply-content {
    color: var(--text);
    line-height: 1.7;
}

.reply-content p {
    margin-bottom: 0.75rem;
}

.reply-content p:last-child {
    margin-bottom: 0;
}

/* Reply Form */
.reply-form {
    padding: 1.5rem;
    background: var(--light);
    border-top: 1px solid var(--border);
}

.reply-form h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Track Ticket */
.track-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-ellipsis {
    padding: 0.5rem;
    color: var(--text-light);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary);
}

.file-upload input {
    display: none;
}

.file-upload i {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.file-upload p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-item i {
    color: var(--primary);
}

.file-item .file-name {
    flex: 1;
    font-size: 0.875rem;
}

.file-item .file-size {
    font-size: 0.75rem;
    color: var(--text-light);
}

.file-item .file-remove {
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
}

/* Attachments in replies */
.reply-attachments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.reply-attachments h4 {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--light);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text);
    text-decoration: none;
}

.attachment-item:hover {
    background: var(--border);
}

.attachment-item i {
    color: var(--primary);
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .ticket-badges {
        flex-direction: row;
        align-items: center;
    }

    .ticket-header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .ticket-details {
        gap: 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
