/**
 * 简易PHP域名管理系统样式表
 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部样式 */
.header {
    background-color: #007bff;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* 主体样式 */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 24px;
    color: #333;
}

.actions {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    text-decoration: none;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    text-decoration: none;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    text-decoration: none;
}

/* 表格样式 */
.domain-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.domain-table thead {
    background-color: #f8f9fa;
}

.domain-table th,
.domain-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.domain-table th {
    font-weight: 600;
    color: #495057;
}

.domain-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 状态样式 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-1 {
    background-color: #d4edda;
    color: #155724;
}

.status-2 {
    background-color: #fff3cd;
    color: #856404;
}

.status-3 {
    background-color: #f8d7da;
    color: #721c24;
}

/* 表格行状态 */
.status-normal {
    background-color: white;
}

.status-expiring {
    background-color: #fff9e6;
}

.status-expired {
    background-color: #ffe6e6;
}

.days-left {
    font-size: 12px;
    color: #856404;
    margin-left: 5px;
}

.days-overdue {
    font-size: 12px;
    color: #721c24;
    margin-left: 5px;
}

/* 域名列样式 */
.domain-name {
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    background-color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state p {
    color: #6c757d;
    font-size: 16px;
}

/* 表格底部 */
.table-footer {
    margin-top: 15px;
    color: #6c757d;
    font-size: 14px;
}

/* 底部样式 */
.footer {
    background-color: #343a40;
    color: white;
    padding: 20px 0;
    margin-top: auto;
}

.footer p {
    text-align: center;
    margin: 5px 0;
}

.footer a {
    color: #17a2b8;
}

.footer a:hover {
    color: #138496;
}

.footer .company-info {
    font-size: 16px;
    margin-top: 10px;
}

.footer .contact-info {
    font-size: 14px;
    margin-top: 5px;
}

.footer .wechat {
    background-color: #28a745;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* 消息提示 */
.flash-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.form-control.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* 搜索表单 */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-form .form-control {
    flex: 1;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 5px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 14px;
}

/* 服务器信息 */
.server-info {
    background-color: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.server-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.info-label {
    font-weight: 500;
    color: #495057;
}

.info-value {
    color: #6c757d;
    font-family: monospace;
    font-size: 13px;
}

/* 后台导航 */
.admin-nav {
    background-color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: #495057;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .domain-table {
        font-size: 12px;
    }

    .domain-table th,
    .domain-table td {
        padding: 8px 10px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .search-form {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-nav ul {
        flex-direction: column;
        gap: 5px;
    }
}
